agama icon indicating copy to clipboard operation
agama copied to clipboard

fix: Clippy warnings

Open joseivanlopez opened this issue 9 months ago • 1 comments

Fix almost all clippy warnings (some of them were automatically fixed with cargo clippy --fix).

Note: there are still some warnings that require more work to get rid of them:

$ cargo clippy
cargo clippy
    Checking agama-server v0.1.0 (/home/ivan/projects/suse/code/agama/rust/agama-server)
warning: module has the same name as its containing module
 --> agama-server/src/l10n.rs:5:1
  |
5 | pub mod l10n;
  | ^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
  = note: `#[warn(clippy::module_inception)]` on by default

warning: very complex type used. Consider factoring parts into `type` definitions
   --> agama-server/src/network/nm/proxies.rs:849:28
    |
849 |     fn addresses(&self) -> zbus::Result<Vec<(Vec<u8>, u32, Vec<u8>)>>;
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
    = note: `#[warn(clippy::type_complexity)]` on by default

warning: very complex type used. Consider factoring parts into `type` definitions
   --> agama-server/src/network/nm/proxies.rs:879:25
    |
879 |     fn routes(&self) -> zbus::Result<Vec<(Vec<u8>, u32, Vec<u8>, u32)>>;
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

warning: `agama-server` (lib) generated 3 warnings
warning: current MSRV (Minimum Supported Rust Version) is `1.74.0` but this item is stable since `1.75.0`
   --> agama-server/src/agama-web-server.rs:233:22
    |
233 |         if addr.ip().to_canonical().is_loopback() {
    |                      ^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
    = note: `#[warn(clippy::incompatible_msrv)]` on by default

joseivanlopez avatar May 17 '24 09:05 joseivanlopez