Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TruongQuangSB committed Dec 12, 2024
1 parent c5f5f19 commit 4e3db2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions native/chromium/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Contributors:
* Guillermo Zunino, Equo - initial implementation
*/

#[cfg(feature = "gen")]
extern crate bindgen;
#[cfg(feature = "gen")]
Expand Down Expand Up @@ -182,8 +183,6 @@ fn generator(cef_path: std::path::Display) -> bindgen::Builder {
.raw_line("#![allow(non_camel_case_types)]")
.raw_line("#![allow(non_upper_case_globals)]")
.raw_line("#![allow(unused_imports)]")
.raw_line("#![allow(clippy::empty_line_after_doc_comments)]")
.raw_line("#![allow(clippy::needless_return)]")
.raw_line("use chromium_jni_macro::FromJava;")
.raw_line("use chromium_jni_utils::FromJava;")
.raw_line("use chromium_jni_utils::FromJavaMember;")
Expand Down
4 changes: 2 additions & 2 deletions native/chromium_jni_macro/src/utils/jni_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn get_type_parameter(p: &Path) -> Punctuated<GenericArgument, Comma> {
/// Extracts Args from an Option function pointer path Option<*mut fn(Args...)>
pub fn extract_arguments(p: &Path) -> syn::punctuated::Punctuated<BareFnArg, Comma> {
let bracket_args = get_type_parameter(p);
return match bracket_args.first().unwrap() {
match bracket_args.first().unwrap() {
GenericArgument::Type(Type::BareFn(t)) => t.inputs.clone(),
_ => panic!("Not a type"),
};
Expand All @@ -67,7 +67,7 @@ pub fn extract_arguments(p: &Path) -> syn::punctuated::Punctuated<BareFnArg, Com
/// Extracts the result type from an Option function pointer path Option<*mut fn(...) -> Result>
pub fn extract_result(p: &Path) -> Option<syn::Type> {
let bracket_args = get_type_parameter(p);
return match bracket_args.first().unwrap() {
match bracket_args.first().unwrap() {
GenericArgument::Type(Type::BareFn(t)) => match t.output.clone() {
ReturnType::Type(_, ty) => Some(*ty),
ReturnType::Default => None,
Expand Down
1 change: 1 addition & 0 deletions native/chromium_jni_macro/src/utils/unzip4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

/// Trait for unzipping 4-tuples
pub trait Unzip4<A, B, C, D> {
fn unzip4<FromA, FromB, FromC, FromD>(self) -> (FromA, FromB, FromC, FromD)
where
Expand Down

0 comments on commit 4e3db2c

Please sign in to comment.