Skip to content

Commit

Permalink
Resolve some clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stormynoct committed Apr 14, 2024
1 parent c475cc3 commit a2910d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/shadowsocks-service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2070,7 +2070,7 @@ impl Config {
acl: None,
#[cfg(any(target_os = "linux", target_os = "android"))]
outbound_fwmark: config.outbound_fwmark,
outbound_bind_addr: outbound_bind_addr,
outbound_bind_addr,
outbound_bind_interface: config.outbound_bind_interface.clone(),
};

Expand Down Expand Up @@ -2876,7 +2876,7 @@ impl fmt::Display for Config {
.and_then(|a| a.file_path().to_str().map(ToOwned::to_owned)),
#[cfg(any(target_os = "linux", target_os = "android"))]
outbound_fwmark: inst.outbound_fwmark.clone(),

Check warning on line 2878 in crates/shadowsocks-service/src/config.rs

View workflow job for this annotation

GitHub Actions / clippy-check (ubuntu-latest)

using `clone` on type `Option<u32>` which implements the `Copy` trait

warning: using `clone` on type `Option<u32>` which implements the `Copy` trait --> crates/shadowsocks-service/src/config.rs:2878:42 | 2878 | outbound_fwmark: inst.outbound_fwmark.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inst.outbound_fwmark` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `#[warn(clippy::clone_on_copy)]` on by default
outbound_bind_addr: inst.outbound_bind_addr.clone(),
outbound_bind_addr: inst.outbound_bind_addr,
outbound_bind_interface: inst.outbound_bind_interface.clone(),
});
}
Expand Down

0 comments on commit a2910d5

Please sign in to comment.