diff options
author | 2023-01-08 21:30:53 +0100 | |
---|---|---|
committer | 2023-03-01 00:33:29 +0100 | |
commit | c40c89bb4edc22c4a60d8677c660a9ab7eb47e92 (patch) | |
tree | 3ba72592f324dd7bef32773211b093e4949d6ff0 /macros/src/lib.rs | |
parent | 6d252785e83218eeb5d080836281c90b86ca0e03 (diff) | |
download | rtic-c40c89bb4edc22c4a60d8677c660a9ab7eb47e92.tar.gz rtic-c40c89bb4edc22c4a60d8677c660a9ab7eb47e92.tar.zst rtic-c40c89bb4edc22c4a60d8677c660a9ab7eb47e92.zip |
Clippy fixes
Diffstat (limited to 'macros/src/lib.rs')
-rw-r--r-- | macros/src/lib.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 34f2bb61..a8422d09 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -39,9 +39,8 @@ pub fn app(args: TokenStream, input: TokenStream) -> TokenStream { Ok(x) => x, }; - match check::app(&app) { - Err(e) => return e.to_compile_error().into(), - _ => {} + if let Err(e) = check::app(&app) { + return e.to_compile_error().into(); } let analysis = analyze::app(analysis, &app); @@ -86,7 +85,7 @@ pub fn app(args: TokenStream, input: TokenStream) -> TokenStream { // Try to write the expanded code to disk if let Some(out_str) = out_dir.to_str() { - fs::write(format!("{}/rtic-expansion.rs", out_str), ts.to_string()).ok(); + fs::write(format!("{out_str}/rtic-expansion.rs"), ts.to_string()).ok(); } ts.into() |