Skip to content

Commit

Permalink
Fix clippy::needless-borrow in str_to_duration
Browse files Browse the repository at this point in the history
  • Loading branch information
BBaoVanC committed Jan 26, 2025
1 parent fc33734 commit 7af8c97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bobashare-web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ pub fn str_to_duration(s: &str) -> Result<StdDuration, StrToDurationError> {
let unit_idx = count_end_idx + 1;

let count_str = &s[..unit_idx];
let count = u64::from_str(&count_str)?;
let count = u64::from_str(count_str)?;
let unit_str = &s[unit_idx..];

Ok(match unit_str {
Expand Down

0 comments on commit 7af8c97

Please sign in to comment.