Skip to content

Merge pull request #43 from LeChatP/develop #4

Merge pull request #43 from LeChatP/develop

Merge pull request #43 from LeChatP/develop #4

Triggered via push May 4, 2024 08:13
Status Success
Total duration 2m 2s
Artifacts

mdbook.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

124 warnings
unused `std::result::Result` that must be used: src/chsr/../database/mod.rs#L139
warning: unused `std::result::Result` that must be used --> src/chsr/../database/mod.rs:139:5 | 139 | write_json_config(&config, path); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this `Result` may be an `Err` variant, which should be handled = note: `#[warn(unused_must_use)]` on by default help: use `let _ = ...` to ignore the resulting value | 139 | let _ = write_json_config(&config, path); | +++++++
single-character string constant used as pattern: src/chsr/../util.rs#L121
warning: single-character string constant used as pattern --> src/chsr/../util.rs:121:45 | 121 | format!("\"{}\"", s.replace("\"", "\\\"")) | ^^^^ help: consider using a `char`: `'"'` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern = note: `#[warn(clippy::single_char_pattern)]` on by default
methods called `into_*` usually take `self` by value: src/chsr/../database/structs.rs#L556
warning: methods called `into_*` usually take `self` by value --> src/chsr/../database/structs.rs:556:22 | 556 | 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
methods called `into_*` usually take `self` by value: src/chsr/../database/structs.rs#L550
warning: methods called `into_*` usually take `self` by value --> src/chsr/../database/structs.rs:550:23 | 550 | 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
field assignment outside of initializer for an instance created with Default::default(): src/chsr/../database/structs.rs#L393
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::STask { name: name, _role: Some(role), ..Default::default() }` and removing relevant reassignments --> src/chsr/../database/structs.rs:392:9 | 392 | let mut ret = STask::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
field assignment outside of initializer for an instance created with Default::default(): src/chsr/../database/structs.rs#L376
warning: field assignment outside of initializer for an instance created with Default::default() --> src/chsr/../database/structs.rs:376:9 | 376 | 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:375:9 | 375 | let mut ret = SRole::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
field assignment outside of initializer for an instance created with Default::default(): src/chsr/../database/structs.rs#L311
warning: field assignment outside of initializer for an instance created with Default::default() --> src/chsr/../database/structs.rs:311:9 | 311 | 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:310:9 | 310 | let mut c = SCapabilities::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
very complex type used. Consider factoring parts into `type` definitions: src/chsr/../database/options.rs#L584
warning: very complex type used. Consider factoring parts into `type` definitions --> src/chsr/../database/options.rs:584:10 | 584 | ) -> ( | __________^ 585 | | PathBehavior, 586 | | Rc<RefCell<LinkedHashSet<String>>>, 587 | | Rc<RefCell<LinkedHashSet<String>>>, 588 | | ) { | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
field assignment outside of initializer for an instance created with Default::default(): src/chsr/../database/options.rs#L477
warning: field assignment outside of initializer for an instance created with Default::default() --> src/chsr/../database/options.rs:477:9 | 477 | 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:476:9 | 476 | let mut opt = Opt::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
stripping a prefix manually: src/chsr/../database/options.rs#L370
warning: stripping a prefix manually --> src/chsr/../database/options.rs:370:9 | 370 | &tzval[1..] | ^^^^^^^^^^^ | note: the prefix was tested here --> src/chsr/../database/options.rs:369:17 | 369 | 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 | 369 ~ let tzval = if let Some(<stripped>) = tzval.strip_prefix(':') { 370 ~ <stripped> |
field assignment outside of initializer for an instance created with Default::default(): src/chsr/../database/options.rs#L339
warning: field assignment outside of initializer for an instance created with Default::default() --> src/chsr/../database/options.rs:339:9 | 339 | 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:338:9 | 338 | let mut res = SEnvOptions::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
field assignment outside of initializer for an instance created with Default::default(): src/chsr/../database/options.rs#L319
warning: field assignment outside of initializer for an instance created with Default::default() --> src/chsr/../database/options.rs:319:9 | 319 | 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:318:9 | 318 | let mut res = SPathOptions::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
field assignment outside of initializer for an instance created with Default::default(): src/chsr/../database/options.rs#L213
warning: field assignment outside of initializer for an instance created with Default::default() --> src/chsr/../database/options.rs:213:9 | 213 | 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:212:9 | 212 | let mut opt = Self::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
name `UID` contains a capitalized acronym: src/chsr/../database/options.rs#L61
warning: name `UID` contains a capitalized acronym --> src/chsr/../database/options.rs:61:5 | 61 | 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
name `TTY` contains a capitalized acronym: src/chsr/../database/options.rs#L60
warning: name `TTY` contains a capitalized acronym --> src/chsr/../database/options.rs:60:5 | 60 | 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
name `PPID` contains a capitalized acronym: src/chsr/../database/options.rs#L59
warning: name `PPID` contains a capitalized acronym --> src/chsr/../database/options.rs:59:5 | 59 | 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
very complex type used. Consider factoring parts into `type` definitions: src/chsr/../database/migration.rs#L12
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
very complex type used. Consider factoring parts into `type` definitions: src/chsr/../database/migration.rs#L11
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 = note: `#[warn(clippy::type_complexity)]` on by default
assigning the result of `Clone::clone()` may be inefficient: src/chsr/../database/finder.rs#L561
warning: assigning the result of `Clone::clone()` may be inefficient --> src/chsr/../database/finder.rs:561:9 | 561 | 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
assigning the result of `Clone::clone()` may be inefficient: src/chsr/../database/finder.rs#L560
warning: assigning the result of `Clone::clone()` may be inefficient --> src/chsr/../database/finder.rs:560:9 | 560 | 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 = note: `#[warn(clippy::assigning_clones)]` on by default
all variants have the same postfix: `Match`: src/chsr/../database/finder.rs#L100
warning: all variants have the same postfix: `Match` --> src/chsr/../database/finder.rs:100:1 | 100 | / pub enum UserMin { 101 | | UserMatch, 102 | | GroupMatch(usize), 103 | | NoMatch, 104 | | } | |_^ | = help: remove the postfixes and use full paths to the variants instead of glob imports = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
current MSRV (Minimum Supported Rust Version) is `1.74.1` but this item is stable since `1.76.0`: src/chsr/../config.rs#L250
warning: current MSRV (Minimum Supported Rust Version) is `1.74.1` but this item is stable since `1.76.0` --> src/chsr/../config.rs:250:10 | 250 | .inspect_err(|e| { | __________^ 251 | | debug!("Error reading file: {}", e); 252 | | }) | |__________^ | = 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
name `JSON` contains a capitalized acronym: src/chsr/../config.rs#L88
warning: name `JSON` contains a capitalized acronym --> src/chsr/../config.rs:88:5 | 88 | JSON(Rc<RefCell<SConfig>>), | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Json` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
name `JSON` contains a capitalized acronym: src/chsr/../config.rs#L78
warning: name `JSON` contains a capitalized acronym --> src/chsr/../config.rs:78:5 | 78 | JSON, | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Json` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms = note: `#[warn(clippy::upper_case_acronyms)]` on by default
unused `std::result::Result` that must be used: src/sr/../database/mod.rs#L139
warning: unused `std::result::Result` that must be used --> src/sr/../database/mod.rs:139:5 | 139 | write_json_config(&config, path); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this `Result` may be an `Err` variant, which should be handled = note: `#[warn(unused_must_use)]` on by default help: use `let _ = ...` to ignore the resulting value | 139 | let _ = write_json_config(&config, path); | +++++++
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`: src/chsr/cli.rs#L1396
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` --> src/chsr/cli.rs:1396:29 | 1396 | // ... opt.as_ref().borrow_mut().wildcard_denied.as_mut().map(|w| { 1397 | || ... w.retain(|c| !options_wildcard.contains(c)); 1398 | || ... }); | ||________________________^- help: try: `if let Some(w) = opt.as_ref().borrow_mut().wildcard_denied.as_mut() { w.retain(|c| !options_wildcard.contains(c)); }` | |________________________| | | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn = note: `#[warn(clippy::option_map_unit_fn)]` on by default
calling `.extend(_.chars())`: src/chsr/cli.rs#L1388
warning: calling `.extend(_.chars())` --> src/chsr/cli.rs:1388:29 | 1388 | ... default_wildcard.extend(options_wildcard.chars()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `default_wildcard.push_str(&options_wildcard)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_extend_chars = note: `#[warn(clippy::string_extend_chars)]` on by default
field assignment outside of initializer for an instance created with Default::default(): src/chsr/cli.rs#L1325
warning: field assignment outside of initializer for an instance created with Default::default() --> src/chsr/cli.rs:1325:21 | 1325 | env.default_behavior = EnvBehavior::Delete; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: consider initializing the variable with `common::database::options::SEnvOptions { default_behavior: EnvBehavior::Delete, keep: options_env.clone(), ..Default::default() }` and removing relevant reassignments --> src/chsr/cli.rs:1324:21 | 1324 | let mut env = SEnvOptions::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default = note: `#[warn(clippy::field_reassign_with_default)]` on by default
unnecessary `if let` since only the `Some` variant of the iterator element is used: src/sr/main.rs#L324
warning: unnecessary `if let` since only the `Some` variant of the iterator element is used --> src/sr/main.rs:324:13 | 324 | for group in res { | ^ --- help: try: `res.flatten()` | _____________| | | 325 | | if let Some(group) = group { 326 | | groups.push(group.gid.as_raw()); 327 | | } 328 | | } | |_____________^ | help: ...and remove the `if let` statement in the for loop --> src/sr/main.rs:325:17 | 325 | / if let Some(group) = group { 326 | | groups.push(group.gid.as_raw()); 327 | | } | |_________________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten = note: `#[warn(clippy::manual_flatten)]` on by default
redundant pattern matching, consider using `is_some()`: src/chsr/cli.rs#L1056
warning: redundant pattern matching, consider using `is_some()` --> src/chsr/cli.rs:1056:32 | 1056 | if let Some(_) = cred_setgid { | -------^^^^^^^-------------- help: try: `if cred_setgid.is_some()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
redundant pattern matching, consider using `is_some()`: src/chsr/cli.rs#L1053
warning: redundant pattern matching, consider using `is_some()` --> src/chsr/cli.rs:1053:32 | 1053 | if let Some(_) = cred_setuid { | -------^^^^^^^-------------- help: try: `if cred_setuid.is_some()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching = note: `#[warn(clippy::redundant_pattern_matching)]` on by default
useless conversion to the same type: `&str`: src/chsr/cli.rs#L965
warning: useless conversion to the same type: `&str` --> src/chsr/cli.rs:965:65 | 965 | let task = borrow.task(&task_id).expect("Task do not exists".into()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"Task do not exists"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
use of `expect` followed by a function call: src/chsr/cli.rs#L965
warning: use of `expect` followed by a function call --> src/chsr/cli.rs:965:58 | 965 | let task = borrow.task(&task_id).expect("Task do not exists".into()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| { panic!("{}", "Task do not exists".into().to_string()) })` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call = note: `#[warn(clippy::expect_fun_call)]` on by default
unneeded `return` statement: src/chsr/cli.rs#L791
warning: unneeded `return` statement --> src/chsr/cli.rs:791:17 | 791 | / return match list_json( 792 | | rconfig, 793 | | role_id, 794 | | task_id, ... | 807 | | } 808 | | }; | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 791 ~ match list_json( 792 + rconfig, 793 + role_id, 794 + task_id, 795 + options, 796 + options_type, 797 + task_type, 798 + role_type, 799 + ) { 800 + Ok(_) => { 801 + debug!("chsr list ok"); 802 + Ok(false) 803 + } 804 + Err(e) => { 805 + debug!("chsr list err {:?}", e); 806 + Err(e) 807 + } 808 ~ } |
name `PPID` contains a capitalized acronym: src/sr/timeout.rs#L35
warning: name `PPID` contains a capitalized acronym --> src/sr/timeout.rs:35:5 | 35 | PPID(pid_t), | ^^^^ 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
name `TTY` contains a capitalized acronym: src/sr/timeout.rs#L34
warning: name `TTY` contains a capitalized acronym --> src/sr/timeout.rs:34:5 | 34 | TTY(dev_t), | ^^^ 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
this boolean expression can be simplified: src/chsr/cli.rs#L546
warning: this boolean expression can be simplified --> src/chsr/cli.rs:546:44 | 546 | if inputs.role_id.is_some() && !inputs.task_id.is_some() { | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `inputs.task_id.is_none()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool = note: `#[warn(clippy::nonminimal_bool)]` on by default
all variants have the same postfix: `List`: src/chsr/cli.rs#L195
warning: all variants have the same postfix: `List` --> src/chsr/cli.rs:195:1 | 195 | / enum SetListType { 196 | | WhiteList, 197 | | BlackList, 198 | | CheckList, 199 | | } | |_^ | = help: remove the postfixes and use full paths to the variants instead of glob imports = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names = note: `#[warn(clippy::enum_variant_names)]` on by default
single-character string constant used as pattern: src/sr/../util.rs#L121
warning: single-character string constant used as pattern --> src/sr/../util.rs:121:45 | 121 | format!("\"{}\"", s.replace("\"", "\\\"")) | ^^^^ help: consider using a `char`: `'"'` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern = note: `#[warn(clippy::single_char_pattern)]` on by default
methods called `into_*` usually take `self` by value: src/sr/../database/structs.rs#L556
warning: methods called `into_*` usually take `self` by value --> src/sr/../database/structs.rs:556:22 | 556 | 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
methods called `into_*` usually take `self` by value: src/sr/../database/structs.rs#L550
warning: methods called `into_*` usually take `self` by value --> src/sr/../database/structs.rs:550:23 | 550 | 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
field assignment outside of initializer for an instance created with Default::default(): src/sr/../database/structs.rs#L393
warning: field assignment outside of initializer for an instance created with Default::default() --> src/sr/../database/structs.rs:393:9 | 393 | 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/sr/../database/structs.rs:392:9 | 392 | let mut ret = STask::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
field assignment outside of initializer for an instance created with Default::default(): src/sr/../database/structs.rs#L376
warning: field assignment outside of initializer for an instance created with Default::default() --> src/sr/../database/structs.rs:376:9 | 376 | 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/sr/../database/structs.rs:375:9 | 375 | let mut ret = SRole::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
field assignment outside of initializer for an instance created with Default::default(): src/sr/../database/structs.rs#L311
warning: field assignment outside of initializer for an instance created with Default::default() --> src/sr/../database/structs.rs:311:9 | 311 | c.add = capset; | ^^^^^^^^^^^^^^^ | note: consider initializing the variable with `common::database::structs::SCapabilities { add: capset, ..Default::default() }` and removing relevant reassignments --> src/sr/../database/structs.rs:310:9 | 310 | let mut c = SCapabilities::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
associated function `default` is never used: src/chsr/../database/wrapper.rs#L15
warning: associated function `default` is never used --> src/chsr/../database/wrapper.rs:15:8 | 14 | pub trait DefaultWrapper { | -------------- associated function in this trait 15 | fn default() -> Self; | ^^^^^^^
associated functions `from_user_id`, `from_group_string`, `from_group_id`, `from_group_vec_string`, and `from_group_vec_id` are never used: src/chsr/../database/structs.rs#L620
warning: associated functions `from_user_id`, `from_group_string`, `from_group_id`, `from_group_vec_string`, and `from_group_vec_id` are never used --> src/chsr/../database/structs.rs:620:12 | 613 | impl SActor { | ----------- associated functions in this implementation ... 620 | pub fn from_user_id(id: u32) -> Self { | ^^^^^^^^^^^^ ... 626 | pub fn from_group_string(group: &str) -> Self { | ^^^^^^^^^^^^^^^^^ ... 632 | pub fn from_group_id(id: u32) -> Self { | ^^^^^^^^^^^^^ ... 638 | pub fn from_group_vec_string(group: Vec<&str>) -> Self { | ^^^^^^^^^^^^^^^^^^^^^ ... 646 | pub fn from_group_vec_id(groups: Vec<u32>) -> Self { | ^^^^^^^^^^^^^^^^^
method `config` is never used: src/chsr/../database/structs.rs#L380
warning: method `config` is never used --> src/chsr/../database/structs.rs:380:12 | 373 | impl SRole { | ---------- method in this implementation ... 380 | pub fn config(&self) -> Option<Rc<RefCell<SConfig>>> { | ^^^^^^
multiple methods are never used: src/chsr/../database/options.rs#L496
warning: multiple methods are never used --> src/chsr/../database/options.rs:496:8 | 430 | impl OptStack { | ------------- methods in this implementation ... 496 | fn save(&mut self) { | ^^^^ ... 523 | fn get_opt(&self, level: Level) -> Option<Rc<RefCell<Opt>>> { | ^^^^^^^ ... 527 | fn find_in_options<F: Fn(&Opt) -> Option<(Level, V)>, V>(&self, f: F) -> Option<(Level, V)> { | ^^^^^^^^^^^^^^^ ... 548 | fn calculate_path(&self) -> String { | ^^^^^^^^^^^^^^ ... 652 | pub fn calculate_filtered_env(&self) -> Result<LinkedHashSet<(String, String)>, String> { | ^^^^^^^^^^^^^^^^^^^^^^ ... 760 | pub fn get_root_behavior(&self) -> (Level, SPrivileged) { | ^^^^^^^^^^^^^^^^^ ... 769 | pub fn get_bounding(&self) -> (Level, SBounding) { | ^^^^^^^^^^^^ ... 778 | pub fn get_wildcard(&self) -> (Level, String) { | ^^^^^^^^^^^^ ... 788 | pub fn get_timeout(&self) -> (Level, STimeout) { | ^^^^^^^^^^^ ... 798 | fn get_lowest_level(&self) -> Level { | ^^^^^^^^^^^^^^^^
function `check_env` is never used: src/chsr/../database/options.rs#L415
warning: function `check_env` is never used --> src/chsr/../database/options.rs:415:4 | 415 | fn check_env(key: &str, value: &str) -> bool { | ^^^^^^^^^
function `tz_is_safe` is never used: src/chsr/../database/options.rs#L367
warning: function `tz_is_safe` is never used --> src/chsr/../database/options.rs:367:4 | 367 | fn tz_is_safe(tzval: &str) -> bool { | ^^^^^^^^^^
associated function `new` is never used: src/chsr/../database/options.rs#L317
warning: associated function `new` is never used --> src/chsr/../database/options.rs:317:8 | 316 | impl SPathOptions { | ----------------- associated function in this implementation 317 | fn new(behavior: PathBehavior) -> Self { | ^^^
variant `None` is never constructed: src/chsr/../database/options.rs#L25
warning: variant `None` is never constructed --> src/chsr/../database/options.rs:25:5 | 24 | pub enum Level { | ----- variant in this enum 25 | None, | ^^^^ | = note: `Level` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
methods `task` and `role` are never used: src/chsr/../database/finder.rs#L85
warning: methods `task` and `role` are never used --> src/chsr/../database/finder.rs:85:12 | 72 | impl ExecSettings { | ----------------- methods in this implementation ... 85 | pub fn task(&self) -> Rc<RefCell<STask>> { | ^^^^ ... 89 | pub fn role(&self) -> Rc<RefCell<SRole>> { | ^^^^
multiple associated functions are never used: src/chsr/../api.rs#L101
warning: multiple associated functions are never used --> src/chsr/../api.rs:101:12 | 83 | impl PluginManager { | ------------------ associated functions in this implementation ... 101 | pub fn subscribe_task_matcher(plugin: TaskMatcher) { | ^^^^^^^^^^^^^^^^^^^^^^ ... 105 | pub fn subscribe_user_matcher(plugin: UserMatcher) { | ^^^^^^^^^^^^^^^^^^^^^^ ... 113 | pub fn subscribe_task_separation(plugin: TaskSeparation) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ ... 117 | pub fn subscribe_caps_filter(plugin: CapsFilter) { | ^^^^^^^^^^^^^^^^^^^^^ ... 121 | pub fn subscribe_privilege_checker(plugin: ExecutionChecker) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 149 | pub fn notify_task_matcher( | ^^^^^^^^^^^^^^^^^^^ ... 188 | pub fn notify_task_separation(task: &STask, actor: &Cred) -> PluginResult { | ^^^^^^^^^^^^^^^^^^^^^^ ... 199 | pub fn notify_caps_filter(task: &STask, capabilities: &mut CapSet) -> PluginResultAction { | ^^^^^^^^^^^^^^^^^^ ... 211 | pub fn notify_privilege_checker(user: &Cred, exec: &mut ExecSettings) -> PluginResult { | ^^^^^^^^^^^^^^^^^^^^^^^^
fields `task_matcher_plugins`, `task_separation_plugins`, `caps_filter_plugins`, and `execution_checker_plugins` are never read: src/chsr/../api.rs#L74
warning: fields `task_matcher_plugins`, `task_separation_plugins`, `caps_filter_plugins`, and `execution_checker_plugins` are never read --> src/chsr/../api.rs:74:5 | 72 | pub struct PluginManager { | ------------- fields in this struct 73 | role_matcher_plugins: Vec<RoleMatcher>, 74 | task_matcher_plugins: Vec<TaskMatcher>, | ^^^^^^^^^^^^^^^^^^^^ ... 77 | task_separation_plugins: Vec<TaskSeparation>, | ^^^^^^^^^^^^^^^^^^^^^^^ 78 | caps_filter_plugins: Vec<CapsFilter>, | ^^^^^^^^^^^^^^^^^^^ 79 | execution_checker_plugins: Vec<ExecutionChecker>, | ^^^^^^^^^^^^^^^^^^^^^^^^^
type alias `TaskInformation` is never used: src/chsr/../api.rs#L53
warning: type alias `TaskInformation` is never used --> src/chsr/../api.rs:53:10 | 53 | pub type TaskInformation = fn(task: &STask) -> Option<String>; | ^^^^^^^^^^^^^^^
type alias `ActorInformation` is never used: src/chsr/../api.rs#L52
warning: type alias `ActorInformation` is never used --> src/chsr/../api.rs:52:10 | 52 | pub type ActorInformation = fn(actor: &SActor) -> Option<String>; | ^^^^^^^^^^^^^^^^
type alias `RoleInformation` is never used: src/chsr/../api.rs#L51
warning: type alias `RoleInformation` is never used --> src/chsr/../api.rs:51:10 | 51 | pub type RoleInformation = fn(role: &SRole) -> Option<String>; | ^^^^^^^^^^^^^^^
type alias `ConfigLoaded` is never used: src/chsr/../api.rs#L34
warning: type alias `ConfigLoaded` is never used --> src/chsr/../api.rs:34:10 | 34 | pub type ConfigLoaded = fn(config: &SConfig); | ^^^^^^^^^^^^
variant `Override` is never constructed: src/chsr/../api.rs#L23
warning: variant `Override` is never constructed --> src/chsr/../api.rs:23:5 | 22 | pub enum PluginResultAction { | ------------------ variant in this enum 23 | Override, // The result of this plugin ends the algorithm to return the plugin result | ^^^^^^^^ | = note: `PluginResultAction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
trait `Plugin` is never used: src/chsr/../api.rs#L16
warning: trait `Plugin` is never used --> src/chsr/../api.rs:16:11 | 16 | pub trait Plugin { | ^^^^^^
function `activates_no_new_privs` is never used: src/chsr/../mod.rs#L95
warning: function `activates_no_new_privs` is never used --> src/chsr/../mod.rs:95:8 | 95 | pub fn activates_no_new_privs() -> Result<(), capctl::Error> { | ^^^^^^^^^^^^^^^^^^^^^^
function `setgid_effective` is never used: src/chsr/../mod.rs#L79
warning: function `setgid_effective` is never used --> src/chsr/../mod.rs:79:8 | 79 | pub fn setgid_effective(enable: bool) -> Result<(), capctl::Error> { | ^^^^^^^^^^^^^^^^
function `setuid_effective` is never used: src/chsr/../mod.rs#L75
warning: function `setuid_effective` is never used --> src/chsr/../mod.rs:75:8 | 75 | pub fn setuid_effective(enable: bool) -> Result<(), capctl::Error> { | ^^^^^^^^^^^^^^^^
function `setpcap_effective` is never used: src/chsr/../mod.rs#L71
warning: function `setpcap_effective` is never used --> src/chsr/../mod.rs:71:8 | 71 | pub fn setpcap_effective(enable: bool) -> Result<(), capctl::Error> { | ^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
very complex type used. Consider factoring parts into `type` definitions: src/sr/../database/options.rs#L584
warning: very complex type used. Consider factoring parts into `type` definitions --> src/sr/../database/options.rs:584:10 | 584 | ) -> ( | __________^ 585 | | PathBehavior, 586 | | Rc<RefCell<LinkedHashSet<String>>>, 587 | | Rc<RefCell<LinkedHashSet<String>>>, 588 | | ) { | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
field assignment outside of initializer for an instance created with Default::default(): src/sr/../database/options.rs#L477
warning: field assignment outside of initializer for an instance created with Default::default() --> src/sr/../database/options.rs:477:9 | 477 | 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/sr/../database/options.rs:476:9 | 476 | let mut opt = Opt::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
stripping a prefix manually: src/sr/../database/options.rs#L370
warning: stripping a prefix manually --> src/sr/../database/options.rs:370:9 | 370 | &tzval[1..] | ^^^^^^^^^^^ | note: the prefix was tested here --> src/sr/../database/options.rs:369:17 | 369 | 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 | 369 ~ let tzval = if let Some(<stripped>) = tzval.strip_prefix(':') { 370 ~ <stripped> |
field assignment outside of initializer for an instance created with Default::default(): src/sr/../database/options.rs#L339
warning: field assignment outside of initializer for an instance created with Default::default() --> src/sr/../database/options.rs:339:9 | 339 | res.default_behavior = behavior; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: consider initializing the variable with `common::database::options::SEnvOptions { default_behavior: behavior, ..Default::default() }` and removing relevant reassignments --> src/sr/../database/options.rs:338:9 | 338 | let mut res = SEnvOptions::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
field assignment outside of initializer for an instance created with Default::default(): src/sr/../database/options.rs#L319
warning: field assignment outside of initializer for an instance created with Default::default() --> src/sr/../database/options.rs:319:9 | 319 | res.default_behavior = behavior; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: consider initializing the variable with `common::database::options::SPathOptions { default_behavior: behavior, ..Default::default() }` and removing relevant reassignments --> src/sr/../database/options.rs:318:9 | 318 | let mut res = SPathOptions::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
field assignment outside of initializer for an instance created with Default::default(): src/sr/../database/options.rs#L213
warning: field assignment outside of initializer for an instance created with Default::default() --> src/sr/../database/options.rs:213:9 | 213 | opt.level = level; | ^^^^^^^^^^^^^^^^^^ | note: consider initializing the variable with `common::database::options::Opt { level: level, ..Default::default() }` and removing relevant reassignments --> src/sr/../database/options.rs:212:9 | 212 | let mut opt = Self::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default = note: `#[warn(clippy::field_reassign_with_default)]` on by default
name `UID` contains a capitalized acronym: src/sr/../database/options.rs#L61
warning: name `UID` contains a capitalized acronym --> src/sr/../database/options.rs:61:5 | 61 | 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
name `TTY` contains a capitalized acronym: src/sr/../database/options.rs#L60
warning: name `TTY` contains a capitalized acronym --> src/sr/../database/options.rs:60:5 | 60 | 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
name `PPID` contains a capitalized acronym: src/sr/../database/options.rs#L59
warning: name `PPID` contains a capitalized acronym --> src/sr/../database/options.rs:59:5 | 59 | 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
very complex type used. Consider factoring parts into `type` definitions: src/sr/../database/migration.rs#L12
warning: very complex type used. Consider factoring parts into `type` definitions --> src/sr/../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
very complex type used. Consider factoring parts into `type` definitions: src/sr/../database/migration.rs#L11
warning: very complex type used. Consider factoring parts into `type` definitions --> src/sr/../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 = note: `#[warn(clippy::type_complexity)]` on by default
assigning the result of `Clone::clone()` may be inefficient: src/sr/../database/finder.rs#L561
warning: assigning the result of `Clone::clone()` may be inefficient --> src/sr/../database/finder.rs:561:9 | 561 | 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
assigning the result of `Clone::clone()` may be inefficient: src/sr/../database/finder.rs#L560
warning: assigning the result of `Clone::clone()` may be inefficient --> src/sr/../database/finder.rs:560:9 | 560 | 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 = note: `#[warn(clippy::assigning_clones)]` on by default
all variants have the same postfix: `Match`: src/sr/../database/finder.rs#L100
warning: all variants have the same postfix: `Match` --> src/sr/../database/finder.rs:100:1 | 100 | / pub enum UserMin { 101 | | UserMatch, 102 | | GroupMatch(usize), 103 | | NoMatch, 104 | | } | |_^ | = help: remove the postfixes and use full paths to the variants instead of glob imports = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names = note: `#[warn(clippy::enum_variant_names)]` on by default
current MSRV (Minimum Supported Rust Version) is `1.74.1` but this item is stable since `1.76.0`: src/sr/../config.rs#L250
warning: current MSRV (Minimum Supported Rust Version) is `1.74.1` but this item is stable since `1.76.0` --> src/sr/../config.rs:250:10 | 250 | .inspect_err(|e| { | __________^ 251 | | debug!("Error reading file: {}", e); 252 | | }) | |__________^ | = 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
name `JSON` contains a capitalized acronym: src/sr/../config.rs#L88
warning: name `JSON` contains a capitalized acronym --> src/sr/../config.rs:88:5 | 88 | JSON(Rc<RefCell<SConfig>>), | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Json` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
name `JSON` contains a capitalized acronym: src/sr/../config.rs#L78
warning: name `JSON` contains a capitalized acronym --> src/sr/../config.rs:78:5 | 78 | JSON, | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Json` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms = note: `#[warn(clippy::upper_case_acronyms)]` on by default
function `escape_parser_string` is never used: src/sr/../util.rs#L112
warning: function `escape_parser_string` is never used --> src/sr/../util.rs:112:8 | 112 | pub fn escape_parser_string<S, I>(s: I) -> String | ^^^^^^^^^^^^^^^^^^^^
associated function `default` is never used: src/sr/../database/wrapper.rs#L15
warning: associated function `default` is never used --> src/sr/../database/wrapper.rs:15:8 | 14 | pub trait DefaultWrapper { | -------------- associated function in this trait 15 | fn default() -> Self; | ^^^^^^^
multiple associated functions are never used: src/sr/../database/structs.rs#L614
warning: multiple associated functions are never used --> src/sr/../database/structs.rs:614:12 | 613 | impl SActor { | ----------- associated functions in this implementation 614 | pub fn from_user_string(user: &str) -> Self { | ^^^^^^^^^^^^^^^^ ... 620 | pub fn from_user_id(id: u32) -> Self { | ^^^^^^^^^^^^ ... 626 | pub fn from_group_string(group: &str) -> Self { | ^^^^^^^^^^^^^^^^^ ... 632 | pub fn from_group_id(id: u32) -> Self { | ^^^^^^^^^^^^^ ... 638 | pub fn from_group_vec_string(group: Vec<&str>) -> Self { | ^^^^^^^^^^^^^^^^^^^^^ ... 646 | pub fn from_group_vec_id(groups: Vec<u32>) -> Self { | ^^^^^^^^^^^^^^^^^ ... 654 | pub fn from_group_vec_actors(groups: Vec<SActorType>) -> Self { | ^^^^^^^^^^^^^^^^^^^^^
associated function `new` is never used: src/sr/../database/structs.rs#L391
warning: associated function `new` is never used --> src/sr/../database/structs.rs:391:12 | 390 | impl STask { | ---------- associated function in this implementation 391 | pub fn new(name: IdTask, role: Weak<RefCell<SRole>>) -> Self { | ^^^
associated items `new` and `config` are never used: src/sr/../database/structs.rs#L374
warning: associated items `new` and `config` are never used --> src/sr/../database/structs.rs:374:12 | 373 | impl SRole { | ---------- associated items in this implementation 374 | pub fn new(name: String, config: Weak<RefCell<SConfig>>) -> Self { | ^^^ ... 380 | pub fn config(&self) -> Option<Rc<RefCell<SConfig>>> { | ^^^^^^
methods `save`, `get_opt`, `get_wildcard`, `get_lowest_level`, and `to_opt` are never used: src/sr/../database/options.rs#L496
warning: methods `save`, `get_opt`, `get_wildcard`, `get_lowest_level`, and `to_opt` are never used --> src/sr/../database/options.rs:496:8 | 430 | impl OptStack { | ------------- methods in this implementation ... 496 | fn save(&mut self) { | ^^^^ ... 523 | fn get_opt(&self, level: Level) -> Option<Rc<RefCell<Opt>>> { | ^^^^^^^ ... 778 | pub fn get_wildcard(&self) -> (Level, String) { | ^^^^^^^^^^^^ ... 798 | fn get_lowest_level(&self) -> Level { | ^^^^^^^^^^^^^^^^ ... 808 | pub fn to_opt(&self) -> Opt { | ^^^^^^
associated function `new` is never used: src/sr/../database/options.rs#L317
warning: associated function `new` is never used --> src/sr/../database/options.rs:317:8 | 316 | impl SPathOptions { | ----------------- associated function in this implementation 317 | fn new(behavior: PathBehavior) -> Self { | ^^^
multiple associated functions are never used: src/sr/../api.rs#L101
warning: multiple associated functions are never used --> src/sr/../api.rs:101:12 | 83 | impl PluginManager { | ------------------ associated functions in this implementation ... 101 | pub fn subscribe_task_matcher(plugin: TaskMatcher) { | ^^^^^^^^^^^^^^^^^^^^^^ ... 105 | pub fn subscribe_user_matcher(plugin: UserMatcher) { | ^^^^^^^^^^^^^^^^^^^^^^ ... 113 | pub fn subscribe_task_separation(plugin: TaskSeparation) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ ... 117 | pub fn subscribe_caps_filter(plugin: CapsFilter) { | ^^^^^^^^^^^^^^^^^^^^^ ... 121 | pub fn subscribe_privilege_checker(plugin: ExecutionChecker) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 149 | pub fn notify_task_matcher( | ^^^^^^^^^^^^^^^^^^^ ... 188 | pub fn notify_task_separation(task: &STask, actor: &Cred) -> PluginResult { | ^^^^^^^^^^^^^^^^^^^^^^ ... 199 | pub fn notify_caps_filter(task: &STask, capabilities: &mut CapSet) -> PluginResultAction { | ^^^^^^^^^^^^^^^^^^ ... 211 | pub fn notify_privilege_checker(user: &Cred, exec: &mut ExecSettings) -> PluginResult { | ^^^^^^^^^^^^^^^^^^^^^^^^
fields `task_matcher_plugins`, `task_separation_plugins`, `caps_filter_plugins`, and `execution_checker_plugins` are never read: src/sr/../api.rs#L74
warning: fields `task_matcher_plugins`, `task_separation_plugins`, `caps_filter_plugins`, and `execution_checker_plugins` are never read --> src/sr/../api.rs:74:5 | 72 | pub struct PluginManager { | ------------- fields in this struct 73 | role_matcher_plugins: Vec<RoleMatcher>, 74 | task_matcher_plugins: Vec<TaskMatcher>, | ^^^^^^^^^^^^^^^^^^^^ ... 77 | task_separation_plugins: Vec<TaskSeparation>, | ^^^^^^^^^^^^^^^^^^^^^^^ 78 | caps_filter_plugins: Vec<CapsFilter>, | ^^^^^^^^^^^^^^^^^^^ 79 | execution_checker_plugins: Vec<ExecutionChecker>, | ^^^^^^^^^^^^^^^^^^^^^^^^^
type alias `TaskInformation` is never used: src/sr/../api.rs#L53
warning: type alias `TaskInformation` is never used --> src/sr/../api.rs:53:10 | 53 | pub type TaskInformation = fn(task: &STask) -> Option<String>; | ^^^^^^^^^^^^^^^
type alias `ActorInformation` is never used: src/sr/../api.rs#L52
warning: type alias `ActorInformation` is never used --> src/sr/../api.rs:52:10 | 52 | pub type ActorInformation = fn(actor: &SActor) -> Option<String>; | ^^^^^^^^^^^^^^^^
type alias `RoleInformation` is never used: src/sr/../api.rs#L51
warning: type alias `RoleInformation` is never used --> src/sr/../api.rs:51:10 | 51 | pub type RoleInformation = fn(role: &SRole) -> Option<String>; | ^^^^^^^^^^^^^^^
type alias `ConfigLoaded` is never used: src/sr/../api.rs#L34
warning: type alias `ConfigLoaded` is never used --> src/sr/../api.rs:34:10 | 34 | pub type ConfigLoaded = fn(config: &SConfig); | ^^^^^^^^^^^^
variant `Override` is never constructed: src/sr/../api.rs#L23
warning: variant `Override` is never constructed --> src/sr/../api.rs:23:5 | 22 | pub enum PluginResultAction { | ------------------ variant in this enum 23 | Override, // The result of this plugin ends the algorithm to return the plugin result | ^^^^^^^^ | = note: `PluginResultAction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
trait `Plugin` is never used: src/sr/../api.rs#L16
warning: trait `Plugin` is never used --> src/sr/../api.rs:16:11 | 16 | pub trait Plugin { | ^^^^^^ | = note: `#[warn(dead_code)]` on by default
unused import: `IntoEnumIterator`: src/chsr/../database/options.rs#L11
warning: unused import: `IntoEnumIterator` --> src/chsr/../database/options.rs:11:50 | 11 | use strum::{Display, EnumIs, EnumIter, FromRepr, IntoEnumIterator}; | ^^^^^^^^^^^^^^^^
unused import: `IntoEnumIterator`: src/sr/../database/options.rs#L11
warning: unused import: `IntoEnumIterator` --> src/sr/../database/options.rs:11:50 | 11 | use strum::{Display, EnumIs, EnumIter, FromRepr, IntoEnumIterator}; | ^^^^^^^^^^^^^^^^
unused import: `ciborium::de`: src/chsr/../plugin/hierarchy.rs#L11
warning: unused import: `ciborium::de` --> src/chsr/../plugin/hierarchy.rs:11:5 | 11 | use ciborium::de; | ^^^^^^^^^^^^
constants have by default a `'static` lifetime: src/chsr/../version.rs#L4
warning: constants have by default a `'static` lifetime --> src/chsr/../version.rs:4:29 | 4 | pub const PACKAGE_VERSION: &'static str = "3.0.0-alpha.4"; | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
unused import: `tracing::debug`: src/chsr/../database/version.rs#L4
warning: unused import: `tracing::debug` --> src/chsr/../database/version.rs:4:5 | 4 | use tracing::debug; | ^^^^^^^^^^^^^^
unused import: `Deserializer`: src/chsr/../database/version.rs#L2
warning: unused import: `Deserializer` --> src/chsr/../database/version.rs:2:26 | 2 | use serde::{Deserialize, Deserializer, Serialize}; | ^^^^^^^^^^^^
this seems like a manual implementation of the non-exhaustive pattern: src/chsr/../database/structs.rs#L32
warning: this seems like a manual implementation of the non-exhaustive pattern --> src/chsr/../database/structs.rs:32:1 | 32 | pub struct SConfig { | ^----------------- | | | _help: add the attribute: `#[non_exhaustive] pub struct SConfig` | | 33 | | #[serde(skip_serializing_if = "Option::is_none")] 34 | | pub options: OptWrapper, 35 | | #[serde(default, skip_serializing_if = "Vec::is_empty")] ... | 41 | | pub _extra_fields: Map<String, Value>, 42 | | } | |_^ | help: remove this field --> src/chsr/../database/structs.rs:38:5 | 38 | storage: (), | ^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive = note: `#[warn(clippy::manual_non_exhaustive)]` on by default
unused import: `tracing::debug`: src/chsr/../database/structs.rs#L13
warning: unused import: `tracing::debug` --> src/chsr/../database/structs.rs:13:5 | 13 | use tracing::debug; | ^^^^^^^^^^^^^^
unused import: `ciborium::de`: src/chsr/../database/options.rs#L5
warning: unused import: `ciborium::de` --> src/chsr/../database/options.rs:5:5 | 5 | use ciborium::de; | ^^^^^^^^^^^^
unused import: `dac_override_effective`: src/chsr/../database/mod.rs#L20
warning: unused import: `dac_override_effective` --> src/chsr/../database/mod.rs:20:5 | 20 | dac_override_effective, immutable_effective, | ^^^^^^^^^^^^^^^^^^^^^^
unused import: `crate::common::read_effective`: src/chsr/../database/mod.rs#L4
warning: unused import: `crate::common::read_effective` --> src/chsr/../database/mod.rs:4:5 | 4 | use crate::common::read_effective; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `ciborium::de`: src/chsr/../config.rs#L57
warning: unused import: `ciborium::de` --> src/chsr/../config.rs:57:5 | 57 | use ciborium::de; | ^^^^^^^^^^^^
unused import: `fs::File`: src/chsr/../config.rs#L55
warning: unused import: `fs::File` --> src/chsr/../config.rs:55:40 | 55 | use std::{cell::RefCell, error::Error, fs::File, path::PathBuf, rc::Rc}; | ^^^^^^^^
unused import: `path::PathBuf`: src/chsr/../mod.rs#L3
warning: unused import: `path::PathBuf` --> src/chsr/../mod.rs:3:39 | 3 | use std::{error::Error, ffi::CString, path::PathBuf}; | ^^^^^^^^^^^^^
unused import: `SCommands`: src/chsr/cli.rs#L27
warning: unused import: `SCommands` --> src/chsr/cli.rs:27:70 | 27 | IdTask, SActor, SActorType, SCapabilities, SCommand, SCommands, SGroups, SRole, | ^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused import: `ciborium::de`: src/sr/../plugin/hierarchy.rs#L11
warning: unused import: `ciborium::de` --> src/sr/../plugin/hierarchy.rs:11:5 | 11 | use ciborium::de; | ^^^^^^^^^^^^
constants have by default a `'static` lifetime: src/sr/../version.rs#L4
warning: constants have by default a `'static` lifetime --> src/sr/../version.rs:4:29 | 4 | pub const PACKAGE_VERSION: &'static str = "3.0.0-alpha.4"; | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
unused import: `tracing::debug`: src/sr/../database/version.rs#L4
warning: unused import: `tracing::debug` --> src/sr/../database/version.rs:4:5 | 4 | use tracing::debug; | ^^^^^^^^^^^^^^
unused import: `Deserializer`: src/sr/../database/version.rs#L2
warning: unused import: `Deserializer` --> src/sr/../database/version.rs:2:26 | 2 | use serde::{Deserialize, Deserializer, Serialize}; | ^^^^^^^^^^^^
this seems like a manual implementation of the non-exhaustive pattern: src/sr/../database/structs.rs#L32
warning: this seems like a manual implementation of the non-exhaustive pattern --> src/sr/../database/structs.rs:32:1 | 32 | pub struct SConfig { | ^----------------- | | | _help: add the attribute: `#[non_exhaustive] pub struct SConfig` | | 33 | | #[serde(skip_serializing_if = "Option::is_none")] 34 | | pub options: OptWrapper, 35 | | #[serde(default, skip_serializing_if = "Vec::is_empty")] ... | 41 | | pub _extra_fields: Map<String, Value>, 42 | | } | |_^ | help: remove this field --> src/sr/../database/structs.rs:38:5 | 38 | storage: (), | ^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive = note: `#[warn(clippy::manual_non_exhaustive)]` on by default
unused import: `tracing::debug`: src/sr/../database/structs.rs#L13
warning: unused import: `tracing::debug` --> src/sr/../database/structs.rs:13:5 | 13 | use tracing::debug; | ^^^^^^^^^^^^^^
unused import: `ciborium::de`: src/sr/../database/options.rs#L5
warning: unused import: `ciborium::de` --> src/sr/../database/options.rs:5:5 | 5 | use ciborium::de; | ^^^^^^^^^^^^
unused import: `dac_override_effective`: src/sr/../database/mod.rs#L20
warning: unused import: `dac_override_effective` --> src/sr/../database/mod.rs:20:5 | 20 | dac_override_effective, immutable_effective, | ^^^^^^^^^^^^^^^^^^^^^^
unused import: `crate::common::read_effective`: src/sr/../database/mod.rs#L4
warning: unused import: `crate::common::read_effective` --> src/sr/../database/mod.rs:4:5 | 4 | use crate::common::read_effective; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `ciborium::de`: src/sr/../config.rs#L57
warning: unused import: `ciborium::de` --> src/sr/../config.rs:57:5 | 57 | use ciborium::de; | ^^^^^^^^^^^^
unused import: `fs::File`: src/sr/../config.rs#L55
warning: unused import: `fs::File` --> src/sr/../config.rs:55:40 | 55 | use std::{cell::RefCell, error::Error, fs::File, path::PathBuf, rc::Rc}; | ^^^^^^^^
unused import: `path::PathBuf`: src/sr/../mod.rs#L3
warning: unused import: `path::PathBuf` --> src/sr/../mod.rs:3:39 | 3 | use std::{error::Error, ffi::CString, path::PathBuf}; | ^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default