chore(deps): update rust crate tokio-stream to v0.1.19 #616
Annotations
10 errors and 3 warnings
|
called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator:
src/paths.rs#L55
error: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
--> src/paths.rs:55:29
|
55 | if matches!(ret.components().last(), Some(Component::Normal(_))) {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#double_ended_iterator_last
note: the lint level is defined here
--> src/lib.rs:23:9
|
23 | #![deny(clippy::perf)]
| ^^^^^^^^^^^^
= note: `#[deny(clippy::double_ended_iterator_last)]` implied by `#[deny(clippy::perf)]`
help: try
|
55 - if matches!(ret.components().last(), Some(Component::Normal(_))) {
55 + if matches!(ret.components().next_back(), Some(Component::Normal(_))) {
|
|
|
unnecessary trailing comma:
src/hoard/iter/all_files.rs#L266
error: unnecessary trailing comma
--> src/hoard/iter/all_files.rs:266:77
|
266 | &format!("could not process entry in {}", path.display(),),
| ^ help: remove the trailing comma
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_trailing_comma
note: the lint level is defined here
--> src/lib.rs:24:9
|
24 | #![deny(clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::unnecessary_trailing_comma)]` implied by `#[deny(clippy::pedantic)]`
|
|
useless conversion to the same type: `config::builder::hoard::Error`:
src/config/builder/hoard.rs#L103
error: useless conversion to the same type: `config::builder::hoard::Error`
--> src/config/builder/hoard.rs:103:66
|
103 | let entry = entry.process_with(envs, exclusivity).map_err(Error::from)?;
| ^^^^^^^^^^^^^^^^^^^^^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_conversion
= note: `#[deny(clippy::useless_conversion)]` implied by `#[deny(clippy::complexity)]`
|
|
this `map_or` can be simplified:
src/config/builder/environment/exe.rs#L78
error: this `map_or` can be simplified
--> src/config/builder/environment/exe.rs:78:33
|
78 | let is_lone_file_name = value.parent().map_or(false, |s| s.as_os_str().is_empty());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_map_or
help: use `is_some_and` instead
|
78 - let is_lone_file_name = value.parent().map_or(false, |s| s.as_os_str().is_empty());
78 + let is_lone_file_name = value.parent().is_some_and(|s| s.as_os_str().is_empty());
|
|
|
this `impl` can be derived:
src/command/mod.rs#L119
error: this `impl` can be derived
--> src/command/mod.rs:119:1
|
119 | / impl Default for Command {
120 | | fn default() -> Self {
121 | | Self::Validate
122 | | }
123 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#derivable_impls
help: replace the manual implementation with a derive attribute and mark the default variant
|
81 + #[derive(Default)]
82 | pub enum Command {
83 | /// Loads all configuration for validation.
84 | /// If the configuration loads and builds, this command succeeds.
85 ~ #[default]
86 ~ Validate,
|
|
|
this `impl` can be derived:
src/checksum/mod.rs#L19
error: this `impl` can be derived
--> src/checksum/mod.rs:19:1
|
19 | / impl Default for ChecksumType {
20 | | fn default() -> Self {
21 | | Self::SHA256
22 | | }
23 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#derivable_impls
note: the lint level is defined here
--> src/lib.rs:22:9
|
22 | #![deny(clippy::complexity)]
| ^^^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::derivable_impls)]` implied by `#[deny(clippy::complexity)]`
help: replace the manual implementation with a derive attribute and mark the default variant
|
12 + #[derive(Default)]
13 | pub enum ChecksumType {
14 | /// MD5 checksum -- provided for backwards compatibility with older versions of Hoard.
15 | MD5,
16 | /// SHA256 checksum -- currently the default.
17 ~ #[default]
18 ~ SHA256,
|
|
|
non-canonical implementation of `partial_cmp` on an `Ord` type:
src/checksum/digest.rs#L116
error: non-canonical implementation of `partial_cmp` on an `Ord` type
--> src/checksum/digest.rs:116:1
|
116 | / impl<T> PartialOrd for Digest<T>
117 | | where
118 | | T: Digestable,
119 | | <<T as Digestable>::OutputSize as Add>::Output: ArrayLength<u8>,
... |
124 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#non_canonical_partial_ord_impl
= note: `#[deny(clippy::non_canonical_partial_ord_impl)]` implied by `#[deny(clippy::all)]`
help: change this to
|
121 - fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
122 - Some(self.0.cmp(&other.0))
123 - }
121 + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.cmp(other)) }
|
|
|
this `map_or` can be simplified:
src/checkers/history/operation/v2.rs#L162
error: this `map_or` can be simplified
--> src/checkers/history/operation/v2.rs:162:9
|
162 | / self.files
163 | | .get_pile(pile_name)
164 | | .map_or(false, |pile| pile.contains_file(rel_path, only_modified))
| |______________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_map_or
help: use `is_some_and` instead
|
164 - .map_or(false, |pile| pile.contains_file(rel_path, only_modified))
164 + .is_some_and(|pile| pile.contains_file(rel_path, only_modified))
|
|
|
this `map_or` can be simplified:
src/checkers/history/operation/v1.rs#L48
error: this `map_or` can be simplified
--> src/checkers/history/operation/v1.rs:48:55
|
48 | (Some(pile_name), Hoard::Named(piles)) => piles
| _______________________________________________________^
49 | | .get(pile_name)
50 | | .map_or(false, |pile| pile.0.contains_key(rel_path)),
| |____________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_map_or
note: the lint level is defined here
--> src/lib.rs:21:9
|
21 | #![deny(clippy::style)]
| ^^^^^^^^^^^^^
= note: `#[deny(clippy::unnecessary_map_or)]` implied by `#[deny(clippy::style)]`
help: use `is_some_and` instead
|
50 - .map_or(false, |pile| pile.0.contains_key(rel_path)),
50 + .is_some_and(|pile| pile.0.contains_key(rel_path)),
|
|
|
empty line after doc comment:
src/checkers/history/operation/v2.rs#L23
error: empty line after doc comment
--> src/checkers/history/operation/v2.rs:23:1
|
23 | / /// Errors that may occur while working with operation logs.
24 | |
| |_^
...
32 | pub struct OperationV2 {
| ---------------------- the comment documents this struct
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#empty_line_after_doc_comments
note: the lint level is defined here
--> src/lib.rs:19:9
|
19 | #![deny(clippy::all)]
| ^^^^^^^^^^^
= note: `#[deny(clippy::empty_line_after_doc_comments)]` implied by `#[deny(clippy::all)]`
= help: if the empty line is unintentional, remove it
help: if the documentation should include the empty line include it in the comment
|
24 | ///
|
|
|
hiding a lifetime that's elided elsewhere is confusing:
src/config/builder/envtrie.rs#L169
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/config/builder/envtrie.rs:169:23
|
169 | fn get_evaluation(&self, envs: &BTreeMap<EnvironmentName, bool>) -> Result<Evaluation, Error> {
| ^^^^^ the lifetime is elided here ^^^^^^^^^^ the same lifetime is hidden here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
169 | fn get_evaluation(&self, envs: &BTreeMap<EnvironmentName, bool>) -> Result<Evaluation<'_>, Error> {
| ++++
|
|
security_audit
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions-rs/audit-check@v1, actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
security_audit
1 warnings found!
|