Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
calebzulawski committed Nov 25, 2024
1 parent 224c543 commit 8562897
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion multiversion-macros/src/match_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl Parse for MatchTarget {
Pat::Or(or) => {
for case in or.cases.iter() {
if let Pat::Lit(lit) = case {
arms.push((parse_target(&lit)?, *arm.body.clone()));
arms.push((parse_target(lit)?, *arm.body.clone()));
} else {
return Err(Error::new(case.span(), "expected a string literal"));
}
Expand Down
2 changes: 1 addition & 1 deletion multiversion-macros/src/multiversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub(crate) fn make_multiversioned_fn(
return Err(Error::new(span, "expected `targets`"));
};

let inner_attrs = inner_attrs.unwrap_or(Vec::new());
let inner_attrs = inner_attrs.unwrap_or_default();
let dispatcher = dispatcher.unwrap_or(DispatchMethod::Default);

Ok(Dispatcher {
Expand Down

0 comments on commit 8562897

Please sign in to comment.