Merge : Add -g option to main #263
quality.yml
on: pull_request
Rust Quality Gate
1m 48s
Annotations
11 warnings
useless conversion to the same type: `std::option::Option<rootasrole_core::database::actor::SGroups>`:
src/sr/main.rs#L158
warning: useless conversion to the same type: `std::option::Option<rootasrole_core::database::actor::SGroups>`
--> src/sr/main.rs:158:25
|
158 | group = iter
| _________________________^
159 | | .next()
160 | | .map(|s| {
161 | | SGroups::Multiple(
... |
167 | | })
168 | | .into();
| |___________________________^
|
= 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
help: consider removing `.into()`
|
158 ~ group = iter
159 + .next()
160 + .map(|s| {
161 + SGroups::Multiple(
162 + s.as_ref()
163 + .split(',')
164 + .map(|g| g.into())
165 + .collect::<Vec<SGroupType>>(),
166 + )
167 ~ });
|
|
this `map_or` can be simplified:
rar-common/src/database/options.rs#L501
warning: this `map_or` can be simplified
--> rar-common/src/database/options.rs:501:9
|
501 | self.as_ref().map_or(false, |set| set.env_matches(needle))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `self.as_ref().is_some_and(|set| set.env_matches(needle))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
|
`to_string` applied to a type that implements `Display` in `debug!` args:
rar-common/src/database/finder.rs#L1197
warning: `to_string` applied to a type that implements `Display` in `debug!` args
--> rar-common/src/database/finder.rs:1197:55
|
1197 | tasks[0].task().as_ref().borrow().name.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
|
`to_string` applied to a type that implements `Display` in `debug!` args:
rar-common/src/database/finder.rs#L1114
warning: `to_string` applied to a type that implements `Display` in `debug!` args
--> rar-common/src/database/finder.rs:1114:55
|
1114 | min_role.task().as_ref().borrow().name.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
|
this `map_or` can be simplified:
rar-common/src/database/finder.rs#L549
warning: this `map_or` can be simplified
--> rar-common/src/database/finder.rs:549:5
|
549 | (*actortype).fetch_id().map_or(false, |id| id == 0)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `((*actortype).fetch_id() == Some(0))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
|
this `map_or` can be simplified:
rar-common/src/database/finder.rs#L545
warning: this `map_or` can be simplified
--> rar-common/src/database/finder.rs:545:5
|
545 | (*actortype).fetch_id().map_or(false, |id| id == 0)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a standard comparison instead: `((*actortype).fetch_id() == Some(0))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `#[warn(clippy::unnecessary_map_or)]` on by default
|
the following explicit lifetimes could be elided: 'de:
rar-common/src/database/actor.rs#L140
warning: the following explicit lifetimes could be elided: 'de
--> rar-common/src/database/actor.rs:140:14
|
140 | impl<'de> Visitor<'de> for IdVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
140 - impl<'de> Visitor<'de> for IdVisitor {
140 + impl Visitor<'_> for IdVisitor {
|
|
Rust Quality Gate
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 Quality Gate
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 Quality Gate
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 Quality Gate
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/
|