Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Dec 12, 2023
1 parent 844da65 commit 7e39ed9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 30 deletions.
54 changes: 25 additions & 29 deletions cidre-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,26 +617,24 @@ fn gen_msg_send(
"sig(Self::cls() as *const _ as *const std::ffi::c_void",
1,
);
} else if fn_args_count == 0 {
fn_args = fn_args.replacen('(', "(cls: *const std::ffi::c_void", 1);
call_args = call_args.replacen(
"sig(self",
"sig(Self::cls() as *const _ as *const std::ffi::c_void",
1,
);
} else {
if fn_args_count == 0 {
fn_args = fn_args.replacen('(', "(cls: *const std::ffi::c_void", 1);
call_args = call_args.replacen(
"sig(self",
"sig(Self::cls() as *const _ as *const std::ffi::c_void",
1,
);
} else {
fn_args = fn_args.replacen(
"(id:",
"(cls: *const std::ffi::c_void, imp: *const std::ffi::c_void,",
1,
);
call_args = call_args.replacen(
"sig(self",
"sig(Self::cls() as *const _ as *const std::ffi::c_void",
1,
);
}
fn_args = fn_args.replacen(
"(id:",
"(cls: *const std::ffi::c_void, imp: *const std::ffi::c_void,",
1,
);
call_args = call_args.replacen(
"sig(self",
"sig(Self::cls() as *const _ as *const std::ffi::c_void",
1,
);
}
}

Expand All @@ -661,10 +659,9 @@ fn gen_msg_send(
"
)
}
} else {
if x86_64 {
format!(
"
} else if x86_64 {
format!(
"
#[inline]
{pre} {fn_name}{gen}{args}{ret_full} {{
Expand All @@ -684,10 +681,10 @@ fn gen_msg_send(
}}
}}
"
)
} else {
format!(
"
)
} else {
format!(
"
#[inline]
{pre} {fn_name}{gen}{args}{ret_full} {{
extern \"C\" {{
Expand All @@ -703,8 +700,7 @@ fn gen_msg_send(
}}
}}
"
)
}
)
};
if debug {
println!("{flow}");
Expand Down
2 changes: 1 addition & 1 deletion cidre/src/ns/path_utilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ impl SearchPathDomainMask {
}

#[inline]
pub fn search_path_for_dirs_in_domains_ar<'ar>(
pub fn search_path_for_dirs_in_domains_ar(
directory: SearchPathDirectory,
domain_mask: SearchPathDomainMask,
expand_tilde: bool,
Expand Down

0 comments on commit 7e39ed9

Please # to comment.