Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.0.0-alpha.5 #50

Merged
merged 32 commits into from
Jun 10, 2024

fix path for cargo

25cae43
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

v3.0.0-alpha.5 #50

fix path for cargo
25cae43
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Jun 10, 2024 in 2s

clippy

123 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 123
Note 0
Help 0

Versions

  • rustc 1.78.0 (9b00956e5 2024-04-29)
  • cargo 1.78.0 (54d8815d0 2024-03-26)
  • clippy 0.1.78 (9b00956 2024-04-29)

Annotations

Check warning on line 122 in src/chsr/../mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

current MSRV (Minimum Supported Rust Version) is `1.74.1` but this item is stable since `1.76.0`

warning: current MSRV (Minimum Supported Rust Version) is `1.74.1` but this item is stable since `1.76.0`
   --> src/chsr/../mod.rs:117:44
    |
117 |           let res = std::fs::File::create(p).inspect_err(|e| {
    |  ____________________________________________^
118 | |             debug!(
119 | |                 "Error creating file without privilege, trying with privileges: {}",
120 | |                 e
121 | |             );
122 | |         });
    | |__________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv

Check warning on line 573 in src/chsr/../database/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods called `into_*` usually take `self` by value

warning: methods called `into_*` usually take `self` by value
   --> src/chsr/../database/structs.rs:573:22
    |
573 |     pub fn into_user(&self) -> Result<Option<User>, Errno> {
    |                      ^^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

Check warning on line 567 in src/chsr/../database/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods called `into_*` usually take `self` by value

warning: methods called `into_*` usually take `self` by value
   --> src/chsr/../database/structs.rs:567:23
    |
567 |     pub fn into_group(&self) -> Result<Option<Group>, Errno> {
    |                       ^^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
    = note: `#[warn(clippy::wrong_self_convention)]` on by default

Check warning on line 410 in src/chsr/../database/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field assignment outside of initializer for an instance created with Default::default()

warning: field assignment outside of initializer for an instance created with Default::default()
   --> src/chsr/../database/structs.rs:410:9
    |
410 |         ret.name = name;
    |         ^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `common::database::structs::STask { name: name, _role: Some(role), ..Default::default() }` and removing relevant reassignments
   --> src/chsr/../database/structs.rs:409:9
    |
409 |         let mut ret = STask::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default

Check warning on line 393 in src/chsr/../database/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field assignment outside of initializer for an instance created with Default::default()

warning: field assignment outside of initializer for an instance created with Default::default()
   --> src/chsr/../database/structs.rs:393:9
    |
393 |         ret.name = name;
    |         ^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `common::database::structs::SRole { name: name, _config: Some(config), ..Default::default() }` and removing relevant reassignments
   --> src/chsr/../database/structs.rs:392:9
    |
392 |         let mut ret = SRole::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default

Check warning on line 328 in src/chsr/../database/structs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field assignment outside of initializer for an instance created with Default::default()

warning: field assignment outside of initializer for an instance created with Default::default()
   --> src/chsr/../database/structs.rs:328:9
    |
328 |         c.add = capset;
    |         ^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `common::database::structs::SCapabilities { add: capset, ..Default::default() }` and removing relevant reassignments
   --> src/chsr/../database/structs.rs:327:9
    |
327 |         let mut c = SCapabilities::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default

Check warning on line 902 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
   --> src/chsr/../database/options.rs:902:25
    |
902 |                         final_set = p.set.clone();
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `final_set.clone_from(&p.set)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

Check warning on line 880 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
   --> src/chsr/../database/options.rs:880:25
    |
880 |                         final_set = p.set.clone();
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `final_set.clone_from(&p.set)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

Check warning on line 853 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
   --> src/chsr/../database/options.rs:847:10
    |
847 |       ) -> (
    |  __________^
848 | |         EnvBehavior,
849 | |         HashMap<String, String>,
850 | |         LinkedHashSet<EnvKey>,
851 | |         LinkedHashSet<EnvKey>,
852 | |         LinkedHashSet<EnvKey>,
853 | |     ) {
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

Check warning on line 718 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
   --> src/chsr/../database/options.rs:714:10
    |
714 |       ) -> (
    |  __________^
715 | |         PathBehavior,
716 | |         Rc<RefCell<LinkedHashSet<String>>>,
717 | |         Rc<RefCell<LinkedHashSet<String>>>,
718 | |     ) {
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

Check warning on line 663 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
   --> src/chsr/../database/options.rs:659:10
    |
659 |       ) -> (
    |  __________^
660 | |         PathBehavior,
661 | |         Rc<RefCell<LinkedHashSet<String>>>,
662 | |         Rc<RefCell<LinkedHashSet<String>>>,
663 | |     ) {
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

Check warning on line 571 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field assignment outside of initializer for an instance created with Default::default()

warning: field assignment outside of initializer for an instance created with Default::default()
   --> src/chsr/../database/options.rs:571:9
    |
571 |         opt.level = Level::Global;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `common::database::options::Opt { level: Level::Global, root: Some(SPrivileged::User), bounding: Some(SBounding::Strict), ..Default::default() }` and removing relevant reassignments
   --> src/chsr/../database/options.rs:570:9
    |
570 |         let mut opt = Opt::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default

Check warning on line 463 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

stripping a prefix manually

warning: stripping a prefix manually
   --> src/chsr/../database/options.rs:463:9
    |
463 |         &tzval[1..]
    |         ^^^^^^^^^^^
    |
note: the prefix was tested here
   --> src/chsr/../database/options.rs:462:17
    |
462 |     let tzval = if tzval.starts_with(':') {
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip
    = note: `#[warn(clippy::manual_strip)]` on by default
help: try using the `strip_prefix` method
    |
462 ~     let tzval = if let Some(<stripped>) = tzval.strip_prefix(':') {
463 ~         <stripped>
    |

Check warning on line 416 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field assignment outside of initializer for an instance created with Default::default()

warning: field assignment outside of initializer for an instance created with Default::default()
   --> src/chsr/../database/options.rs:416:9
    |
416 |         res.default_behavior = behavior;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `common::database::options::SEnvOptions { default_behavior: behavior, ..Default::default() }` and removing relevant reassignments
   --> src/chsr/../database/options.rs:415:9
    |
415 |         let mut res = SEnvOptions::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default

Check warning on line 395 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field assignment outside of initializer for an instance created with Default::default()

warning: field assignment outside of initializer for an instance created with Default::default()
   --> src/chsr/../database/options.rs:395:9
    |
395 |         res.default_behavior = behavior;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `common::database::options::SPathOptions { default_behavior: behavior, ..Default::default() }` and removing relevant reassignments
   --> src/chsr/../database/options.rs:394:9
    |
394 |         let mut res = SPathOptions::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default

Check warning on line 276 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field assignment outside of initializer for an instance created with Default::default()

warning: field assignment outside of initializer for an instance created with Default::default()
   --> src/chsr/../database/options.rs:276:9
    |
276 |         timeout.type_field = Some(TimestampType::PPID);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `common::database::options::STimeout { type_field: Some(TimestampType::PPID), duration: Some(Duration::minutes(5)), ..Default::default() }` and removing relevant reassignments
   --> src/chsr/../database/options.rs:275:9
    |
275 |         let mut timeout = STimeout::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default

Check warning on line 224 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field assignment outside of initializer for an instance created with Default::default()

warning: field assignment outside of initializer for an instance created with Default::default()
   --> src/chsr/../database/options.rs:224:9
    |
224 |         opt.level = level;
    |         ^^^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `common::database::options::Opt { level: level, ..Default::default() }` and removing relevant reassignments
   --> src/chsr/../database/options.rs:223:9
    |
223 |         let mut opt = Self::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default

Check warning on line 134 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

direct implementation of `ToString`

warning: direct implementation of `ToString`
   --> src/chsr/../database/options.rs:130:1
    |
130 | / impl ToString for EnvKey {
131 | |     fn to_string(&self) -> String {
132 | |         self.value.clone()
133 | |     }
134 | | }
    | |_^
    |
    = help: prefer implementing `Display` instead
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
    = note: `#[warn(clippy::to_string_trait_impl)]` on by default

Check warning on line 63 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

name `UID` contains a capitalized acronym

warning: name `UID` contains a capitalized acronym
  --> src/chsr/../database/options.rs:63:5
   |
63 |     UID,
   |     ^^^ help: consider making the acronym lowercase, except the initial letter: `Uid`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms

Check warning on line 62 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

name `TTY` contains a capitalized acronym

warning: name `TTY` contains a capitalized acronym
  --> src/chsr/../database/options.rs:62:5
   |
62 |     TTY,
   |     ^^^ help: consider making the acronym lowercase, except the initial letter: `Tty`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms

Check warning on line 61 in src/chsr/../database/options.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

name `PPID` contains a capitalized acronym

warning: name `PPID` contains a capitalized acronym
  --> src/chsr/../database/options.rs:61:5
   |
61 |     PPID,
   |     ^^^^ help: consider making the acronym lowercase, except the initial letter: `Ppid`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms

Check warning on line 12 in src/chsr/../database/migration.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
  --> src/chsr/../database/migration.rs:12:15
   |
12 |     pub down: fn(&Self, &mut T) -> Result<(), Box<dyn Error>>,
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

Check warning on line 11 in src/chsr/../database/migration.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
  --> src/chsr/../database/migration.rs:11:13
   |
11 |     pub up: fn(&Self, &mut T) -> Result<(), Box<dyn Error>>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

Check warning on line 621 in src/chsr/../database/finder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
   --> src/chsr/../database/finder.rs:621:9
    |
621 |         settings.setgroups = setgid.clone();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `settings.setgroups.clone_from(setgid)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

Check warning on line 620 in src/chsr/../database/finder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
   --> src/chsr/../database/finder.rs:620:9
    |
620 |         settings.setuid = setuid.clone();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `settings.setuid.clone_from(setuid)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones