Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed Oct 31, 2024
1 parent ea39d24 commit e838a4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/controller/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ pub fn print_backtrace(bt: &std::backtrace::Backtrace) -> Result<()> {
backtrace_printer::print_backtrace(
&mut std::io::stdout(),
bt,
&get_name_blocklist(),
&get_file_blocklist(),
get_name_blocklist(),
get_file_blocklist(),
)
.map_err(Error::msg)
}
2 changes: 1 addition & 1 deletion src/controller/middleware/remote_ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fn maybe_get_forwarded(
// trusted proxies provided REPLACES our default local proxies
let proxies = trusted_proxies
.as_ref()
.unwrap_or(&get_local_trusted_proxies());
.unwrap_or_else(|| get_local_trusted_proxies());
!proxies
.iter()
.any(|trusted_proxy| trusted_proxy.contains(*ip))
Expand Down
4 changes: 2 additions & 2 deletions src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn get_cleanup_mail() -> &'static Vec<(&'static str, &'static str)> {
/// ```
#[must_use]
pub fn cleanup_user_model() -> Vec<(&'static str, &'static str)> {
let mut combined_filters = get_cleanup_user_model().to_vec();
let mut combined_filters = get_cleanup_user_model().clone();
combined_filters.extend(get_cleanup_date().iter().copied());
combined_filters.extend(get_cleanup_model().iter().copied());
combined_filters
Expand All @@ -114,7 +114,7 @@ pub fn cleanup_user_model() -> Vec<(&'static str, &'static str)> {
/// Combines cleanup filters from emails that can be dynamic
#[must_use]
pub fn cleanup_email() -> Vec<(&'static str, &'static str)> {
let mut combined_filters = get_cleanup_mail().to_vec();
let mut combined_filters = get_cleanup_mail().clone();
combined_filters.extend(get_cleanup_date().iter().copied());
combined_filters
}
Expand Down

0 comments on commit e838a4d

Please sign in to comment.