This should fix installation #195
This workflow graph cannot be shown
A graph will be generated the next time this workflow is run.
Annotations
1 error and 54 warnings
Invalid workflow file:
.github/workflows/tests.yml#L29
You have an error in your yaml syntax on line 29
|
field assignment outside of initializer for an instance created with Default::default():
src/chsr/cli/process/json.rs#L888
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/chsr/cli/process/json.rs:888:13
|
888 | path.default_behavior = options_path_policy;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `rar_common::database::options::SPathOptions { default_behavior: options_path_policy, ..Default::default() }` and removing relevant reassignments
--> src/chsr/cli/process/json.rs:887:13
|
887 | let mut path = 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/cli/process/json.rs#L610
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/chsr/cli/process/json.rs:610:9
|
610 | env.default_behavior = options_env_policy;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `rar_common::database::options::SEnvOptions { default_behavior: options_env_policy, ..Default::default() }` and removing relevant reassignments
--> src/chsr/cli/process/json.rs:609:9
|
609 | 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
|
very complex type used. Consider factoring parts into `type` definitions:
src/chsr/cli/pair.rs#L22
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/chsr/cli/pair.rs:22:18
|
22 | do_matching: &dyn Fn(&Pair<Rule>, &mut Inputs) -> 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
|
all variants have the same postfix: `List`:
src/chsr/cli/data.rs#L46
warning: all variants have the same postfix: `List`
--> src/chsr/cli/data.rs:46:1
|
46 | / pub enum SetListType {
47 | | WhiteList,
48 | | BlackList,
49 | | CheckList,
50 | | SetList,
51 | | }
| |_^
|
= 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
|
unnecessary `if let` since only the `Some` variant of the iterator element is used:
src/sr/main.rs#L400
warning: unnecessary `if let` since only the `Some` variant of the iterator element is used
--> src/sr/main.rs:400:13
|
400 | for group in res {
| ^ --- help: try: `res.flatten()`
| _____________|
| |
401 | | if let Some(group) = group {
402 | | groups.push(group.gid.as_raw());
403 | | }
404 | | }
| |_____________^
|
help: ...and remove the `if let` statement in the for loop
--> src/sr/main.rs:401:17
|
401 | / if let Some(group) = group {
402 | | groups.push(group.gid.as_raw());
403 | | }
| |_________________^
= 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
|
returning the result of a `let` binding from a block:
src/sr/main.rs#L324
warning: returning the result of a `let` binding from a block
--> src/sr/main.rs:324:5
|
318 | / let user = Cred {
319 | | user,
320 | | groups,
321 | | tty,
322 | | ppid,
323 | | };
| |______- unnecessary `let` binding
324 | user
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
318 ~
319 ~ Cred {
320 + user,
321 + groups,
322 + tty,
323 + ppid,
324 + }
|
|
`to_string` applied to a type that implements `Display` in `eprintln!` args:
src/sr/main.rs#L279
warning: `to_string` applied to a type that implements `Display` in `eprintln!` args
--> src/sr/main.rs:279:68
|
279 | eprintln!("sr: {} : {}", execcfg.exec_path.display(), e.to_string());
| ^^^^^^^^^^^^ help: remove this
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
= note: `#[warn(clippy::to_string_in_format_args)]` on by default
|
current MSRV (Minimum Supported Rust Version) is `1.74.1` but this item is stable since `1.76.0`:
src/sr/main.rs#L214
warning: current MSRV (Minimum Supported Rust Version) is `1.74.1` but this item is stable since `1.76.0`
--> src/sr/main.rs:214:14
|
214 | .inspect_err(|e| {
| ______________^
215 | | error!("{}", e);
216 | | })
| |______________^
|
= 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
|
this loop could be written as a `for` loop:
src/sr/main.rs#L177
warning: this loop could be written as a `for` loop
--> src/sr/main.rs:177:5
|
177 | while let Some(arg) = iter.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for arg in iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
the borrowed expression implements the required traits:
src/sr/timeout.rs#L184
warning: the borrowed expression implements the required traits
--> src/sr/timeout.rs:184:15
|
184 | .join(&user.user.uid.as_raw().to_string())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `user.user.uid.as_raw().to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
src/sr/timeout.rs#L181
warning: the borrowed expression implements the required traits
--> src/sr/timeout.rs:181:44
|
181 | let path = Path::new(TS_LOCATION).join(&user.user.uid.as_raw().to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `user.user.uid.as_raw().to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
src/sr/timeout.rs#L164
warning: the borrowed expression implements the required traits
--> src/sr/timeout.rs:164:44
|
164 | let path = Path::new(TS_LOCATION).join(&user.user.uid.as_raw().to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `user.user.uid.as_raw().to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
name `PPID` contains a capitalized acronym:
src/sr/timeout.rs#L40
warning: name `PPID` contains a capitalized acronym
--> src/sr/timeout.rs:40:5
|
40 | 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#L39
warning: name `TTY` contains a capitalized acronym
--> src/sr/timeout.rs:39:5
|
39 | 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
= note: `#[warn(clippy::upper_case_acronyms)]` on by default
|
method `leak` is never used:
src/sr/pam/securemem.rs#L29
warning: method `leak` is never used
--> src/sr/pam/securemem.rs:29:12
|
26 | impl PamBuffer {
| -------------- method in this implementation
...
29 | pub fn leak(self) -> NonNull<u8> {
| ^^^^
|
function `errno_location` is never used:
src/sr/pam/cutils.rs#L27
warning: function `errno_location` is never used
--> src/sr/pam/cutils.rs:27:8
|
27 | fn errno_location() -> *mut libc::c_int;
| ^^^^^^^^^^^^^^
|
function `safe_isatty` is never used:
src/sr/pam/cutils.rs#L72
warning: function `safe_isatty` is never used
--> src/sr/pam/cutils.rs:72:8
|
72 | pub fn safe_isatty(fildes: libc::c_int) -> bool {
| ^^^^^^^^^^^
|
function `os_string_from_ptr` is never used:
src/sr/pam/cutils.rs#L60
warning: function `os_string_from_ptr` is never used
--> src/sr/pam/cutils.rs:60:15
|
60 | pub unsafe fn os_string_from_ptr(ptr: *const libc::c_char) -> OsString {
| ^^^^^^^^^^^^^^^^^^
|
function `string_from_ptr` is never used:
src/sr/pam/cutils.rs#L46
warning: function `string_from_ptr` is never used
--> src/sr/pam/cutils.rs:46:15
|
46 | pub unsafe fn string_from_ptr(ptr: *const libc::c_char) -> String {
| ^^^^^^^^^^^^^^^
|
function `sysconf` is never used:
src/sr/pam/cutils.rs#L34
warning: function `sysconf` is never used
--> src/sr/pam/cutils.rs:34:8
|
34 | pub fn sysconf(name: libc::c_int) -> Option<libc::c_long> {
| ^^^^^^^
|
function `set_errno` is never used:
src/sr/pam/cutils.rs#L30
warning: function `set_errno` is never used
--> src/sr/pam/cutils.rs:30:8
|
30 | pub fn set_errno(no: libc::c_int) {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unexpected `cfg` condition name: `tarpaulin_include`:
src/chsr/main.rs#L14
warning: unexpected `cfg` condition name: `tarpaulin_include`
--> src/chsr/main.rs:14:11
|
14 | #[cfg(not(tarpaulin_include))]
| ^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tarpaulin_include)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
|
unexpected `cfg` condition name: `tarpaulin_include`:
src/sr/main.rs#L183
warning: unexpected `cfg` condition name: `tarpaulin_include`
--> src/sr/main.rs:183:11
|
183 | #[cfg(not(tarpaulin_include))]
| ^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tarpaulin_include)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
|
passing a unit value to a function:
rar-common/src/util.rs#L82
warning: passing a unit value to a function
--> rar-common/src/util.rs:82:5
|
82 | / Ok(match effective {
83 | | false => {
84 | | read_effective(false).and(dac_override_effective(false))?;
85 | | }
... |
88 | | }
89 | | })
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
= note: `#[warn(clippy::unit_arg)]` on by default
help: move the expression in front of the call and replace it with the unit literal `()`
|
82 ~ match effective {
83 + false => {
84 + read_effective(false).and(dac_override_effective(false))?;
85 + }
86 + true => {
87 + read_effective(true).or(dac_override_effective(true))?;
88 + }
89 + };
90 + Ok(())
|
|
field assignment outside of initializer for an instance created with Default::default():
rar-common/src/database/structs.rs#L409
warning: field assignment outside of initializer for an instance created with Default::default()
--> rar-common/src/database/structs.rs:409:9
|
409 | ret.name = name;
| ^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `database::structs::STask { name: name, _role: Some(role), ..Default::default() }` and removing relevant reassignments
--> rar-common/src/database/structs.rs:408:9
|
408 | 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():
rar-common/src/database/structs.rs#L392
warning: field assignment outside of initializer for an instance created with Default::default()
--> rar-common/src/database/structs.rs:392:9
|
392 | ret.name = name;
| ^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `database::structs::SRole { name: name, _config: Some(config), ..Default::default() }` and removing relevant reassignments
--> rar-common/src/database/structs.rs:391:9
|
391 | 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():
rar-common/src/database/structs.rs#L327
warning: field assignment outside of initializer for an instance created with Default::default()
--> rar-common/src/database/structs.rs:327:9
|
327 | c.add = capset;
| ^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `database::structs::SCapabilities { add: capset, ..Default::default() }` and removing relevant reassignments
--> rar-common/src/database/structs.rs:326:9
|
326 | let mut c = SCapabilities::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
|
enum `SGroups` has a public `len` method, but no `is_empty` method:
rar-common/src/database/structs.rs#L84
warning: enum `SGroups` has a public `len` method, but no `is_empty` method
--> rar-common/src/database/structs.rs:84:5
|
84 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
= note: `#[warn(clippy::len_without_is_empty)]` on by default
|
very complex type used. Consider factoring parts into `type` definitions:
rar-common/src/database/options.rs#L865
warning: very complex type used. Consider factoring parts into `type` definitions
--> rar-common/src/database/options.rs:865:10
|
865 | ) -> (
| __________^
866 | | EnvBehavior,
867 | | HashMap<String, String>,
868 | | LinkedHashSet<EnvKey>,
869 | | LinkedHashSet<EnvKey>,
870 | | LinkedHashSet<EnvKey>,
871 | | ) {
| |_____^
|
= 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:
rar-common/src/database/options.rs#L731
warning: very complex type used. Consider factoring parts into `type` definitions
--> rar-common/src/database/options.rs:731:10
|
731 | ) -> (
| __________^
732 | | PathBehavior,
733 | | Rc<RefCell<LinkedHashSet<String>>>,
734 | | Rc<RefCell<LinkedHashSet<String>>>,
735 | | ) {
| |_____^
|
= 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:
rar-common/src/database/options.rs#L676
warning: very complex type used. Consider factoring parts into `type` definitions
--> rar-common/src/database/options.rs:676:10
|
676 | ) -> (
| __________^
677 | | PathBehavior,
678 | | Rc<RefCell<LinkedHashSet<String>>>,
679 | | Rc<RefCell<LinkedHashSet<String>>>,
680 | | ) {
| |_____^
|
= 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():
rar-common/src/database/options.rs#L588
warning: field assignment outside of initializer for an instance created with Default::default()
--> rar-common/src/database/options.rs:588:9
|
588 | opt.level = Level::Global;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `database::options::Opt { level: Level::Global, root: Some(SPrivileged::User), bounding: Some(SBounding::Strict), ..Default::default() }` and removing relevant reassignments
--> rar-common/src/database/options.rs:587:9
|
587 | 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:
rar-common/src/database/options.rs#L480
warning: stripping a prefix manually
--> rar-common/src/database/options.rs:480:9
|
480 | &tzval[1..]
| ^^^^^^^^^^^
|
note: the prefix was tested here
--> rar-common/src/database/options.rs:479:17
|
479 | 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
|
479 ~ let tzval = if let Some(<stripped>) = tzval.strip_prefix(':') {
480 ~ <stripped>
|
|
field assignment outside of initializer for an instance created with Default::default():
rar-common/src/database/options.rs#L437
warning: field assignment outside of initializer for an instance created with Default::default()
--> rar-common/src/database/options.rs:437:9
|
437 | res.default_behavior = behavior;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `database::options::SEnvOptions { default_behavior: behavior, ..Default::default() }` and removing relevant reassignments
--> rar-common/src/database/options.rs:436:9
|
436 | 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():
rar-common/src/database/options.rs#L416
warning: field assignment outside of initializer for an instance created with Default::default()
--> rar-common/src/database/options.rs:416:9
|
416 | res.default_behavior = behavior;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `database::options::SPathOptions { default_behavior: behavior, ..Default::default() }` and removing relevant reassignments
--> rar-common/src/database/options.rs:415:9
|
415 | 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():
rar-common/src/database/options.rs#L279
warning: field assignment outside of initializer for an instance created with Default::default()
--> rar-common/src/database/options.rs:279:9
|
279 | timeout.type_field = Some(TimestampType::PPID);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `database::options::STimeout { type_field: Some(TimestampType::PPID), duration: Some(Duration::minutes(5)), ..Default::default() }` and removing relevant reassignments
--> rar-common/src/database/options.rs:278:9
|
278 | let mut timeout = STimeout::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():
rar-common/src/database/options.rs#L227
warning: field assignment outside of initializer for an instance created with Default::default()
--> rar-common/src/database/options.rs:227:9
|
227 | opt.level = level;
| ^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `database::options::Opt { level: level, ..Default::default() }` and removing relevant reassignments
--> rar-common/src/database/options.rs:226:9
|
226 | 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
|
direct implementation of `ToString`:
rar-common/src/database/options.rs#L133
warning: direct implementation of `ToString`
--> rar-common/src/database/options.rs:133:1
|
133 | / impl ToString for EnvKey {
134 | | fn to_string(&self) -> String {
135 | | self.value.clone()
136 | | }
137 | | }
| |_^
|
= help: prefer implementing `Display` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
= note: `#[warn(clippy::to_string_trait_impl)]` on by default
|
very complex type used. Consider factoring parts into `type` definitions:
rar-common/src/database/migration.rs#L12
warning: very complex type used. Consider factoring parts into `type` definitions
--> rar-common/src/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:
rar-common/src/database/migration.rs#L11
warning: very complex type used. Consider factoring parts into `type` definitions
--> rar-common/src/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
|
unneeded `return` statement:
rar-common/src/database/finder.rs#L363
warning: unneeded `return` statement
--> rar-common/src/database/finder.rs:363:9
|
363 | return Ok(CmdMin::Match);
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
363 - return Ok(CmdMin::Match);
363 + Ok(CmdMin::Match)
|
|
unneeded `return` statement:
rar-common/src/database/finder.rs#L359
warning: unneeded `return` statement
--> rar-common/src/database/finder.rs:359:9
|
359 | / return evaluate_regex_cmd(role_args, commandline).inspect_err(|e| {
360 | | debug!("No match for args {:?}", input_args);
361 | | });
| |__________^
|
= 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`
|
359 ~ evaluate_regex_cmd(role_args, commandline).inspect_err(|e| {
360 + debug!("No match for args {:?}", input_args);
361 ~ })
|
|
you should consider adding a `Default` implementation for `PluginManager`:
rar-common/src/api.rs#L97
warning: you should consider adding a `Default` implementation for `PluginManager`
--> rar-common/src/api.rs:97:5
|
97 | / pub fn new() -> Self {
98 | | PluginManager {
99 | | #[cfg(feature = "finder")]
100 | | role_matcher_plugins: Vec::new(),
... |
113 | | }
114 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
96 + impl Default for PluginManager {
97 + fn default() -> Self {
98 + Self::new()
99 + }
100 + }
|
|
methods `get_opt` and `get_lowest_level` are never used:
rar-common/src/database/options.rs#L615
warning: methods `get_opt` and `get_lowest_level` are never used
--> rar-common/src/database/options.rs:615:8
|
541 | impl OptStack {
| ------------- methods in this implementation
...
615 | fn get_opt(&self, level: Level) -> Option<Rc<RefCell<Opt>>> {
| ^^^^^^^
...
1095 | fn get_lowest_level(&self) -> Level {
| ^^^^^^^^^^^^^^^^
|
associated function `new` is never used:
rar-common/src/database/options.rs#L414
warning: associated function `new` is never used
--> rar-common/src/database/options.rs:414:8
|
413 | impl SPathOptions {
| ----------------- associated function in this implementation
414 | fn new(behavior: PathBehavior) -> Self {
| ^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `e`:
rar-common/src/database/finder.rs#L359
warning: unused variable: `e`
--> rar-common/src/database/finder.rs:359:72
|
359 | return evaluate_regex_cmd(role_args, commandline).inspect_err(|e| {
| ^ help: if this is intentional, prefix it with an underscore: `_e`
|
= note: `#[warn(unused_variables)]` on by default
|
constants have by default a `'static` lifetime:
rar-common/src/version.rs#L4
warning: constants have by default a `'static` lifetime
--> rar-common/src/version.rs:4:29
|
4 | pub const PACKAGE_VERSION: &'static str = "3.0.0-alpha.5";
| -^^^^^^^---- 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: `PermissionsExt`:
rar-common/src/util.rs#L9
warning: unused import: `PermissionsExt`
--> rar-common/src/util.rs:9:33
|
9 | unix::fs::{MetadataExt, PermissionsExt},
| ^^^^^^^^^^^^^^
|
this seems like a manual implementation of the non-exhaustive pattern:
rar-common/src/database/structs.rs#L30
warning: this seems like a manual implementation of the non-exhaustive pattern
--> rar-common/src/database/structs.rs:30:1
|
30 | pub struct SConfig {
| ^-----------------
| |
| _help: add the attribute: `#[non_exhaustive] pub struct SConfig`
| |
31 | | #[serde(skip_serializing_if = "Option::is_none")]
32 | | pub options: OptWrapper,
33 | | #[serde(default, skip_serializing_if = "Vec::is_empty")]
... |
39 | | pub _extra_fields: Map<String, Value>,
40 | | }
| |_^
|
help: remove this field
--> rar-common/src/database/structs.rs:36:5
|
36 | 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
|
unexpected `cfg` condition name: `tarpaulin_include`:
rar-common/src/database/options.rs#L972
warning: unexpected `cfg` condition name: `tarpaulin_include`
--> rar-common/src/database/options.rs:972:15
|
972 | #[cfg(not(tarpaulin_include))]
| ^^^^^^^^^^^^^^^^^
|
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tarpaulin_include)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
|
unexpected `cfg` condition name: `tarpaulin_include`:
rar-common/src/database/options.rs#L728
warning: unexpected `cfg` condition name: `tarpaulin_include`
--> rar-common/src/database/options.rs:728:15
|
728 | #[cfg(not(tarpaulin_include))]
| ^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tarpaulin_include)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
|
unused import: `nix::features`:
rar-common/src/database/options.rs#L9
warning: unused import: `nix::features`
--> rar-common/src/database/options.rs:9:5
|
9 | use nix::features;
| ^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
function `write_doc` is never used:
build.rs#L58
warning: function `write_doc` is never used
--> build.rs:58:4
|
58 | fn write_doc(f: &mut File) -> Result<(), Box<dyn Error>> {
| ^^^^^^^^^
|
function `set_pkgbuild_version` is never used:
build.rs#L42
warning: function `set_pkgbuild_version` is never used
--> build.rs:42:4
|
42 | fn set_pkgbuild_version(package_version: &str, file: &str) -> Result<(), Box<dyn Error>> {
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|