Skip to content

Commit

Permalink
Fix new clippy lints (#2713)
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev committed May 23, 2024
1 parent 3b4771c commit 176c0af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,9 @@ impl IntoFuture for ClientBuilder {
if let Some(ratelimiter) = &mut http.ratelimiter {
let event_handlers_clone = event_handlers.clone();
ratelimiter.set_ratelimit_callback(Box::new(move |info| {
for event_handler in event_handlers_clone.iter().map(Arc::clone) {
for event_handler in &event_handlers_clone {
let info = info.clone();
let event_handler = Arc::clone(event_handler);
tokio::spawn(async move { event_handler.ratelimit(info).await });
}
}));
Expand Down
2 changes: 1 addition & 1 deletion src/model/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ pub mod comma_separated_string {
vec: &FixedArray<FixedString>,
serializer: S,
) -> Result<S::Ok, S::Error> {
let vec: Vec<String> = vec.iter().map(FixedString::clone).map(String::from).collect();
let vec: Vec<String> = vec.iter().cloned().map(String::from).collect();
serializer.serialize_str(&vec.join(", "))
}
}
Expand Down

0 comments on commit 176c0af

Please sign in to comment.