Skip to content

Commit

Permalink
clippy fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
fakeshadow committed Jan 14, 2024
1 parent 577a17a commit 868dce2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion router/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ fn normalize_params(mut path: Vec<u8>) -> Result<(Vec<u8>, ParamRemapping), Inse
};

// makes sure the param has a valid name unless it's * catch all
if wildcard.len() < 2 && wildcard.get(0).filter(|w| **w == b'*').is_none() {
if wildcard.len() < 2 && wildcard.first().filter(|w| **w == b'*').is_none() {
return Err(InsertError::UnnamedParam);
}

Expand Down

0 comments on commit 868dce2

Please sign in to comment.