v3.0.0-alpha.4 #104
Annotations
3 errors and 106 warnings
equal expressions as operands to `==`:
src/chsr/../plugin/ssd.rs#L43
error: equal expressions as operands to `==`
--> src/chsr/../plugin/ssd.rs:43:28
|
43 | if group == group {
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op
= note: `#[deny(clippy::eq_op)]` on by default
|
equal expressions as operands to `==`:
src/sr/../plugin/ssd.rs#L43
error: equal expressions as operands to `==`
--> src/sr/../plugin/ssd.rs:43:28
|
43 | if group == group {
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op
= note: `#[deny(clippy::eq_op)]` on by default
|
rust-coverage
Process completed with exit code 101.
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/chsr/../plugin/ssd.rs#L97
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/chsr/../plugin/ssd.rs:97:57
|
97 | fn groups_are_forbidden(groups: &Vec<Group>, ssd_roles: &Vec<String>, sconfig: &SConfig) -> bool {
| ^^^^^^^^^^^^ help: change this to: `&[String]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/chsr/../plugin/ssd.rs#L72
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/chsr/../plugin/ssd.rs:72:46
|
72 | fn user_is_forbidden(user: &User, ssd_roles: &Vec<String>, sconfig: &SConfig) -> bool {
| ^^^^^^^^^^^^ help: change this to: `&[String]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/chsr/../plugin/ssd.rs#L62
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/chsr/../plugin/ssd.rs:62:29
|
62 | fn groups_subset_of(groups: &Vec<Group>, actors: &Vec<SActor>) -> bool {
| ^^^^^^^^^^^ help: change this to: `&[Group]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/chsr/../plugin/ssd.rs#L37
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/chsr/../plugin/ssd.rs:37:46
|
37 | fn group_contained_in(group: &Group, actors: &Vec<SActor>) -> bool {
| ^^^^^^^^^^^^ help: change this to: `&[SActor]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/chsr/../plugin/ssd.rs#L21
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/chsr/../plugin/ssd.rs:21:43
|
21 | fn user_contained_in(user: &User, actors: &Vec<SActor>) -> bool {
| ^^^^^^^^^^^^ help: change this to: `&[SActor]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
|
name `SSD` contains a capitalized acronym:
src/chsr/../plugin/ssd.rs#L19
warning: name `SSD` contains a capitalized acronym
--> src/chsr/../plugin/ssd.rs:19:12
|
19 | pub struct SSD(Vec<String>);
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Ssd`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
|
in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
src/chsr/../database/version.rs#L51
warning: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> src/chsr/../database/version.rs:51:23
|
51 | .and_then(|b| {
| _______________________^
52 | | intermediate.version = version::PACKAGE_VERSION.to_owned().parse()?;
53 | | debug!("Migrated from {}", intermediate.version);
54 | | Ok(b)
55 | | })
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
= note: `#[warn(clippy::blocks_in_conditions)]` on by default
|
methods called `into_*` usually take `self` by value:
src/chsr/../database/structs.rs#L555
warning: methods called `into_*` usually take `self` by value
--> src/chsr/../database/structs.rs:555:22
|
555 | 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#L549
warning: methods called `into_*` usually take `self` by value
--> src/chsr/../database/structs.rs:549:23
|
549 | 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#L392
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/chsr/../database/structs.rs:392:9
|
392 | 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:391:9
|
391 | 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#L375
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/chsr/../database/structs.rs:375:9
|
375 | 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:374:9
|
374 | 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#L310
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/chsr/../database/structs.rs:310:9
|
310 | 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:309:9
|
309 | let mut c = SCapabilities::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_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
|
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
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/sr/../plugin/ssd.rs#L97
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/sr/../plugin/ssd.rs:97:57
|
97 | fn groups_are_forbidden(groups: &Vec<Group>, ssd_roles: &Vec<String>, sconfig: &SConfig) -> bool {
| ^^^^^^^^^^^^ help: change this to: `&[String]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/sr/../plugin/ssd.rs#L72
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/sr/../plugin/ssd.rs:72:46
|
72 | fn user_is_forbidden(user: &User, ssd_roles: &Vec<String>, sconfig: &SConfig) -> bool {
| ^^^^^^^^^^^^ help: change this to: `&[String]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/sr/../plugin/ssd.rs#L62
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/sr/../plugin/ssd.rs:62:29
|
62 | fn groups_subset_of(groups: &Vec<Group>, actors: &Vec<SActor>) -> bool {
| ^^^^^^^^^^^ help: change this to: `&[Group]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/sr/../plugin/ssd.rs#L37
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/sr/../plugin/ssd.rs:37:46
|
37 | fn group_contained_in(group: &Group, actors: &Vec<SActor>) -> bool {
| ^^^^^^^^^^^^ help: change this to: `&[SActor]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/sr/../plugin/ssd.rs#L21
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/sr/../plugin/ssd.rs:21:43
|
21 | fn user_contained_in(user: &User, actors: &Vec<SActor>) -> bool {
| ^^^^^^^^^^^^ help: change this to: `&[SActor]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
|
name `SSD` contains a capitalized acronym:
src/sr/../plugin/ssd.rs#L19
warning: name `SSD` contains a capitalized acronym
--> src/sr/../plugin/ssd.rs:19:12
|
19 | pub struct SSD(Vec<String>);
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Ssd`
|
= 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/options.rs#L582
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/chsr/../database/options.rs:582:10
|
582 | ) -> (
| __________^
583 | | PathBehavior,
584 | | Rc<RefCell<LinkedHashSet<String>>>,
585 | | Rc<RefCell<LinkedHashSet<String>>>,
586 | | ) {
| |_____^
|
= 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#L475
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/chsr/../database/options.rs:475:9
|
475 | 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:474:9
|
474 | 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#L368
warning: stripping a prefix manually
--> src/chsr/../database/options.rs:368:9
|
368 | &tzval[1..]
| ^^^^^^^^^^^
|
note: the prefix was tested here
--> src/chsr/../database/options.rs:367:17
|
367 | 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
|
367 ~ let tzval = if let Some(<stripped>) = tzval.strip_prefix(':') {
368 ~ <stripped>
|
|
field assignment outside of initializer for an instance created with Default::default():
src/chsr/../database/options.rs#L337
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/chsr/../database/options.rs:337:9
|
337 | 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:336:9
|
336 | 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#L317
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/chsr/../database/options.rs:317:9
|
317 | 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:316:9
|
316 | 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#L212
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/chsr/../database/options.rs:212:9
|
212 | 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:211:9
|
211 | let mut opt = Self::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
|
in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
src/sr/../database/version.rs#L51
warning: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> src/sr/../database/version.rs:51:23
|
51 | .and_then(|b| {
| _______________________^
52 | | intermediate.version = version::PACKAGE_VERSION.to_owned().parse()?;
53 | | debug!("Migrated from {}", intermediate.version);
54 | | Ok(b)
55 | | })
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
= note: `#[warn(clippy::blocks_in_conditions)]` on by default
|
methods called `into_*` usually take `self` by value:
src/sr/../database/structs.rs#L555
warning: methods called `into_*` usually take `self` by value
--> src/sr/../database/structs.rs:555:22
|
555 | 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#L549
warning: methods called `into_*` usually take `self` by value
--> src/sr/../database/structs.rs:549:23
|
549 | 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#L392
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/sr/../database/structs.rs:392:9
|
392 | 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:391:9
|
391 | 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#L375
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/sr/../database/structs.rs:375:9
|
375 | 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:374:9
|
374 | 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#L310
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/sr/../database/structs.rs:310:9
|
310 | 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:309:9
|
309 | let mut c = SCapabilities::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#L60
warning: name `UID` contains a capitalized acronym
--> src/chsr/../database/options.rs:60:5
|
60 | 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#L59
warning: name `TTY` contains a capitalized acronym
--> src/chsr/../database/options.rs:59:5
|
59 | 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#L58
warning: name `PPID` contains a capitalized acronym
--> src/chsr/../database/options.rs:58:5
|
58 | 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
|
very complex type used. Consider factoring parts into `type` definitions:
src/sr/../database/options.rs#L582
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/sr/../database/options.rs:582:10
|
582 | ) -> (
| __________^
583 | | PathBehavior,
584 | | Rc<RefCell<LinkedHashSet<String>>>,
585 | | Rc<RefCell<LinkedHashSet<String>>>,
586 | | ) {
| |_____^
|
= 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#L475
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/sr/../database/options.rs:475:9
|
475 | 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:474:9
|
474 | let mut opt = Opt::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_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
|
stripping a prefix manually:
src/sr/../database/options.rs#L368
warning: stripping a prefix manually
--> src/sr/../database/options.rs:368:9
|
368 | &tzval[1..]
| ^^^^^^^^^^^
|
note: the prefix was tested here
--> src/sr/../database/options.rs:367:17
|
367 | 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
|
367 ~ let tzval = if let Some(<stripped>) = tzval.strip_prefix(':') {
368 ~ <stripped>
|
|
field assignment outside of initializer for an instance created with Default::default():
src/sr/../database/options.rs#L337
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/sr/../database/options.rs:337:9
|
337 | 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:336:9
|
336 | 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#L317
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/sr/../database/options.rs:317:9
|
317 | 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:316:9
|
316 | 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#L212
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/sr/../database/options.rs:212:9
|
212 | 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:211:9
|
211 | 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#L60
warning: name `UID` contains a capitalized acronym
--> src/sr/../database/options.rs:60:5
|
60 | 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#L59
warning: name `TTY` contains a capitalized acronym
--> src/sr/../database/options.rs:59:5
|
59 | 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#L58
warning: name `PPID` contains a capitalized acronym
--> src/sr/../database/options.rs:58:5
|
58 | 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
|
name `JSON` contains a capitalized acronym:
src/chsr/../config.rs#L81
warning: name `JSON` contains a capitalized acronym
--> src/chsr/../config.rs:81:5
|
81 | 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#L71
warning: name `JSON` contains a capitalized acronym
--> src/chsr/../config.rs:71:5
|
71 | 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
|
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
|
field assignment outside of initializer for an instance created with Default::default():
src/chsr/cli.rs#L1092
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/chsr/cli.rs:1092:21
|
1092 | 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:1091:21
|
1091 | 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
|
all variants have the same postfix: `List`:
src/chsr/cli.rs#L193
warning: all variants have the same postfix: `List`
--> src/chsr/cli.rs:193:1
|
193 | / enum SetListType {
194 | | WhiteList,
195 | | BlackList,
196 | | CheckList,
197 | | }
| |_^
|
= 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
|
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
|
function `capset_to_vec` is never used:
src/chsr/../util.rs#L85
warning: function `capset_to_vec` is never used
--> src/chsr/../util.rs:85:8
|
85 | pub fn capset_to_vec(set: &capctl::CapSet) -> Vec<String> {
| ^^^^^^^^^^^^^
|
function `capset_to_string` is never used:
src/chsr/../util.rs#L75
warning: function `capset_to_string` is never used
--> src/chsr/../util.rs:75:8
|
75 | pub fn capset_to_string(set: &CapSet) -> String {
| ^^^^^^^^^^^^^^^^
|
associated function `deserialize` is never used:
src/chsr/../database/version.rs#L38
warning: associated function `deserialize` is never used
--> src/chsr/../database/version.rs:38:12
|
37 | impl Versioning<SConfig> {
| ------------------------ associated function in this implementation
38 | pub fn deserialize<'de, D>(deserializer: D) -> Result<SConfig, D::Error>
| ^^^^^^^^^^^
|
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#L619
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:619:12
|
612 | impl SActor {
| ----------- associated functions in this implementation
...
619 | pub fn from_user_id(id: u32) -> Self {
| ^^^^^^^^^^^^
...
625 | pub fn from_group_string(group: &str) -> Self {
| ^^^^^^^^^^^^^^^^^
...
631 | pub fn from_group_id(id: u32) -> Self {
| ^^^^^^^^^^^^^
...
637 | pub fn from_group_vec_string(group: Vec<&str>) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^
...
645 | pub fn from_group_vec_id(groups: Vec<u32>) -> Self {
| ^^^^^^^^^^^^^^^^^
|
method `config` is never used:
src/chsr/../database/structs.rs#L379
warning: method `config` is never used
--> src/chsr/../database/structs.rs:379:12
|
372 | impl SRole {
| ---------- method in this implementation
...
379 | pub fn config(&self) -> Option<Rc<RefCell<SConfig>>> {
| ^^^^^^
|
multiple methods are never used:
src/chsr/../database/options.rs#L494
warning: multiple methods are never used
--> src/chsr/../database/options.rs:494:8
|
428 | impl OptStack {
| ------------- methods in this implementation
...
494 | fn save(&mut self) {
| ^^^^
...
521 | fn get_opt(&self, level: Level) -> Option<Rc<RefCell<Opt>>> {
| ^^^^^^^
...
525 | fn find_in_options<F: Fn(&Opt) -> Option<(Level, V)>, V>(&self, f: F) -> Option<(Level, V)> {
| ^^^^^^^^^^^^^^^
...
546 | fn calculate_path(&self) -> String {
| ^^^^^^^^^^^^^^
...
650 | pub fn calculate_filtered_env(&self) -> Result<LinkedHashSet<(String, String)>, String> {
| ^^^^^^^^^^^^^^^^^^^^^^
...
758 | pub fn get_root_behavior(&self) -> (Level, SPrivileged) {
| ^^^^^^^^^^^^^^^^^
...
767 | pub fn get_bounding(&self) -> (Level, SBounding) {
| ^^^^^^^^^^^^
...
776 | pub fn get_wildcard(&self) -> (Level, String) {
| ^^^^^^^^^^^^
...
786 | pub fn get_timeout(&self) -> (Level, STimeout) {
| ^^^^^^^^^^^
...
796 | fn get_lowest_level(&self) -> Level {
| ^^^^^^^^^^^^^^^^
|
function `check_env` is never used:
src/chsr/../database/options.rs#L413
warning: function `check_env` is never used
--> src/chsr/../database/options.rs:413:4
|
413 | fn check_env(key: &str, value: &str) -> bool {
| ^^^^^^^^^
|
function `tz_is_safe` is never used:
src/chsr/../database/options.rs#L365
warning: function `tz_is_safe` is never used
--> src/chsr/../database/options.rs:365:4
|
365 | fn tz_is_safe(tzval: &str) -> bool {
| ^^^^^^^^^^
|
associated function `new` is never used:
src/chsr/../database/options.rs#L315
warning: associated function `new` is never used
--> src/chsr/../database/options.rs:315:8
|
314 | impl SPathOptions {
| ----------------- associated function in this implementation
315 | fn new(behavior: PathBehavior) -> Self {
| ^^^
|
variant `None` is never constructed:
src/chsr/../database/options.rs#L24
warning: variant `None` is never constructed
--> src/chsr/../database/options.rs:24:5
|
23 | pub enum Level {
| ----- variant in this enum
24 | 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) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
148 | pub fn notify_task_matcher(
| ^^^^^^^^^^^^^^^^^^^
...
187 | pub fn notify_task_separation(task: &STask, actor: &Cred) -> PluginResult {
| ^^^^^^^^^^^^^^^^^^^^^^
...
198 | pub fn notify_caps_filter(task: &STask, capabilities: &mut CapSet) -> PluginResultAction {
| ^^^^^^^^^^^^^^^^^^
...
210 | 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
|
function `activates_no_new_privs` is never used:
src/chsr/../mod.rs#L92
warning: function `activates_no_new_privs` is never used
--> src/chsr/../mod.rs:92:8
|
92 | pub fn activates_no_new_privs() -> Result<(), capctl::Error> {
| ^^^^^^^^^^^^^^^^^^^^^^
|
function `setgid_effective` is never used:
src/chsr/../mod.rs#L76
warning: function `setgid_effective` is never used
--> src/chsr/../mod.rs:76:8
|
76 | pub fn setgid_effective(enable: bool) -> Result<(), capctl::Error> {
| ^^^^^^^^^^^^^^^^
|
function `setuid_effective` is never used:
src/chsr/../mod.rs#L72
warning: function `setuid_effective` is never used
--> src/chsr/../mod.rs:72:8
|
72 | pub fn setuid_effective(enable: bool) -> Result<(), capctl::Error> {
| ^^^^^^^^^^^^^^^^
|
function `setpcap_effective` is never used:
src/chsr/../mod.rs#L68
warning: function `setpcap_effective` is never used
--> src/chsr/../mod.rs:68:8
|
68 | pub fn setpcap_effective(enable: bool) -> Result<(), capctl::Error> {
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
name `JSON` contains a capitalized acronym:
src/sr/../config.rs#L81
warning: name `JSON` contains a capitalized acronym
--> src/sr/../config.rs:81:5
|
81 | 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#L71
warning: name `JSON` contains a capitalized acronym
--> src/sr/../config.rs:71:5
|
71 | 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 `capset_to_vec` is never used:
src/sr/../util.rs#L85
warning: function `capset_to_vec` is never used
--> src/sr/../util.rs:85:8
|
85 | pub fn capset_to_vec(set: &capctl::CapSet) -> Vec<String> {
| ^^^^^^^^^^^^^
|
function `capset_to_string` is never used:
src/sr/../util.rs#L75
warning: function `capset_to_string` is never used
--> src/sr/../util.rs:75:8
|
75 | pub fn capset_to_string(set: &CapSet) -> String {
| ^^^^^^^^^^^^^^^^
|
associated function `deserialize` is never used:
src/sr/../database/version.rs#L38
warning: associated function `deserialize` is never used
--> src/sr/../database/version.rs:38:12
|
37 | impl Versioning<SConfig> {
| ------------------------ associated function in this implementation
38 | pub fn deserialize<'de, D>(deserializer: D) -> Result<SConfig, D::Error>
| ^^^^^^^^^^^
|
multiple associated functions are never used:
src/sr/../database/structs.rs#L613
warning: multiple associated functions are never used
--> src/sr/../database/structs.rs:613:12
|
612 | impl SActor {
| ----------- associated functions in this implementation
613 | pub fn from_user_string(user: &str) -> Self {
| ^^^^^^^^^^^^^^^^
...
619 | pub fn from_user_id(id: u32) -> Self {
| ^^^^^^^^^^^^
...
625 | pub fn from_group_string(group: &str) -> Self {
| ^^^^^^^^^^^^^^^^^
...
631 | pub fn from_group_id(id: u32) -> Self {
| ^^^^^^^^^^^^^
...
637 | pub fn from_group_vec_string(group: Vec<&str>) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^
...
645 | pub fn from_group_vec_id(groups: Vec<u32>) -> Self {
| ^^^^^^^^^^^^^^^^^
...
653 | pub fn from_group_vec_actors(groups: Vec<SActorType>) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^
|
associated function `new` is never used:
src/sr/../database/structs.rs#L390
warning: associated function `new` is never used
--> src/sr/../database/structs.rs:390:12
|
389 | impl STask {
| ---------- associated function in this implementation
390 | pub fn new(name: IdTask, role: Weak<RefCell<SRole>>) -> Self {
| ^^^
|
associated items `new` and `config` are never used:
src/sr/../database/structs.rs#L373
warning: associated items `new` and `config` are never used
--> src/sr/../database/structs.rs:373:12
|
372 | impl SRole {
| ---------- associated items in this implementation
373 | pub fn new(name: String, config: Weak<RefCell<SConfig>>) -> Self {
| ^^^
...
379 | 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#L494
warning: methods `save`, `get_opt`, `get_wildcard`, `get_lowest_level`, and `to_opt` are never used
--> src/sr/../database/options.rs:494:8
|
428 | impl OptStack {
| ------------- methods in this implementation
...
494 | fn save(&mut self) {
| ^^^^
...
521 | fn get_opt(&self, level: Level) -> Option<Rc<RefCell<Opt>>> {
| ^^^^^^^
...
776 | pub fn get_wildcard(&self) -> (Level, String) {
| ^^^^^^^^^^^^
...
796 | fn get_lowest_level(&self) -> Level {
| ^^^^^^^^^^^^^^^^
...
806 | pub fn to_opt(&self) -> Opt {
| ^^^^^^
|
associated function `new` is never used:
src/sr/../database/options.rs#L315
warning: associated function `new` is never used
--> src/sr/../database/options.rs:315:8
|
314 | impl SPathOptions {
| ----------------- associated function in this implementation
315 | 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) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
148 | pub fn notify_task_matcher(
| ^^^^^^^^^^^^^^^^^^^
...
187 | pub fn notify_task_separation(task: &STask, actor: &Cred) -> PluginResult {
| ^^^^^^^^^^^^^^^^^^^^^^
...
198 | pub fn notify_caps_filter(task: &STask, capabilities: &mut CapSet) -> PluginResultAction {
| ^^^^^^^^^^^^^^^^^^
...
210 | 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
= note: `#[warn(dead_code)]` on by default
|
unused import: `IntoEnumIterator`:
src/chsr/../database/options.rs#L10
warning: unused import: `IntoEnumIterator`
--> src/chsr/../database/options.rs:10:50
|
10 | use strum::{Display, EnumIs, EnumIter, FromRepr, IntoEnumIterator};
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
unused import: `IntoEnumIterator`:
src/sr/../database/options.rs#L10
warning: unused import: `IntoEnumIterator`
--> src/sr/../database/options.rs:10:50
|
10 | use strum::{Display, EnumIs, EnumIter, FromRepr, IntoEnumIterator};
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
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
|
this seems like a manual implementation of the non-exhaustive pattern:
src/chsr/../database/structs.rs#L31
warning: this seems like a manual implementation of the non-exhaustive pattern
--> src/chsr/../database/structs.rs:31:1
|
31 | pub struct SConfig {
| ^-----------------
| |
| _help: add the attribute: `#[non_exhaustive] pub struct SConfig`
| |
32 | | #[serde(skip_serializing_if = "Option::is_none")]
33 | | pub options: OptWrapper,
34 | | #[serde(default, skip_serializing_if = "Vec::is_empty")]
... |
40 | | pub _extra_fields: Map<String, Value>,
41 | | }
| |_^
|
help: remove this field
--> src/chsr/../database/structs.rs:37:5
|
37 | 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
|
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
|
this seems like a manual implementation of the non-exhaustive pattern:
src/sr/../database/structs.rs#L31
warning: this seems like a manual implementation of the non-exhaustive pattern
--> src/sr/../database/structs.rs:31:1
|
31 | pub struct SConfig {
| ^-----------------
| |
| _help: add the attribute: `#[non_exhaustive] pub struct SConfig`
| |
32 | | #[serde(skip_serializing_if = "Option::is_none")]
33 | | pub options: OptWrapper,
34 | | #[serde(default, skip_serializing_if = "Vec::is_empty")]
... |
40 | | pub _extra_fields: Map<String, Value>,
41 | | }
| |_^
|
help: remove this field
--> src/sr/../database/structs.rs:37:5
|
37 | 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
|
rust-coverage
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, codecov/codecov-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
rust-coverage
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
rust-coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
rust-coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
rust-coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
rust-coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|