Skip to content

Commit d47e4a3

Browse files
committed
Resolve unnecessary_semicolon pedantic clippy lint
warning: unnecessary semicolon --> gen/build/src/target.rs:17:10 | 17 | }; | ^ help: remove | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon = note: `-W clippy::unnecessary-semicolon` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnecessary_semicolon)]` warning: unnecessary semicolon --> macro/src/expand.rs:729:6 | 729 | }; | ^ help: remove | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon = note: `-W clippy::unnecessary-semicolon` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnecessary_semicolon)]`
1 parent 9288757 commit d47e4a3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: gen/build/src/target.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ pub(crate) enum TargetDir {
1010
pub(crate) fn find_target_dir(out_dir: &Path) -> TargetDir {
1111
if let Some(target_dir) = env::var_os("CARGO_TARGET_DIR") {
1212
let target_dir = PathBuf::from(target_dir);
13-
if target_dir.is_absolute() {
14-
return TargetDir::Path(target_dir);
13+
return if target_dir.is_absolute() {
14+
TargetDir::Path(target_dir)
1515
} else {
16-
return TargetDir::Unknown;
16+
TargetDir::Unknown
1717
};
1818
}
1919

Diff for: macro/src/expand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ fn expand_cxx_function_shim(efn: &ExternFn, types: &Types) -> TokenStream {
726726
if efn.throws {
727727
expr = quote_spanned!(span=> ::cxx::core::result::Result::Ok(#expr));
728728
}
729-
};
729+
}
730730
let dispatch = quote_spanned!(span=> unsafe { #setup #expr });
731731
let visibility = efn.visibility;
732732
let unsafety = &efn.sig.unsafety;

0 commit comments

Comments
 (0)