Skip to content

fix ignoring reported when calling get shadow (#66) #233

fix ignoring reported when calling get shadow (#66)

fix ignoring reported when calling get shadow (#66) #233

Triggered via push October 15, 2024 11:57
Status Success
Total duration 3m 52s
Artifacts

ci.yml

on: push
Cancel previous runs
4s
Cancel previous runs
Integration Tests
2m 44s
Integration Tests
Fit to window
Zoom out
Zoom in

Annotations

53 warnings
Cancel previous runs
The following actions uses node12 which is deprecated and will be forced to run on node16: styfle/[email protected]. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Cancel previous runs
The following actions use a deprecated Node.js version and will be forced to run on node20: styfle/[email protected]. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
rustfmt
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L568
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:568:13 | 568 | S::NAME.unwrap_or_else(|| CLASSIC_SHADOW), | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L510
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:510:21 | 510 | S::NAME.unwrap_or_else(|| CLASSIC_SHADOW) | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L493
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:493:33 | 493 | ... S::NAME.unwrap_or_else(|| CLASSIC_SHADOW), | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
redundant pattern matching, consider using `is_some()`: src/shadows/mod.rs#L490
warning: redundant pattern matching, consider using `is_some()` --> src/shadows/mod.rs:490:32 | 490 | if let Some(_) = delta.state { | -------^^^^^^^-------------- help: try this: `if delta.state.is_some()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L484
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:484:21 | 484 | S::NAME.unwrap_or_else(|| CLASSIC_SHADOW), | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L461
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:461:29 | 461 | ... S::NAME.unwrap_or_else(|| CLASSIC_SHADOW) | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
redundant pattern matching, consider using `is_some()`: src/shadows/mod.rs#L445
warning: redundant pattern matching, consider using `is_some()` --> src/shadows/mod.rs:445:39 | 445 | } else if let Some(_) = response.state.reported { | -------^^^^^^^-------------------------- help: try this: `if response.state.reported.is_some()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L438
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:438:33 | 438 | ... S::NAME.unwrap_or_else(|| CLASSIC_SHADOW) | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
redundant pattern matching, consider using `is_some()`: src/shadows/mod.rs#L435
warning: redundant pattern matching, consider using `is_some()` --> src/shadows/mod.rs:435:32 | 435 | if let Some(_) = response.state.delta { | -------^^^^^^^----------------------- help: try this: `if response.state.delta.is_some()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`: src/shadows/mod.rs#L413
warning: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]` --> src/shadows/mod.rs:413:5 | 413 | / pub fn handle_message( 414 | | &mut self, 415 | | topic: &str, 416 | | payload: &[u8], 417 | | ) -> Result<(&S, Option<S::PatchState>), Error> { | |___________________________________________________^ | = help: either add some descriptive text or remove the attribute = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L305
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:305:21 | 305 | S::NAME.unwrap_or_else(|| CLASSIC_SHADOW) | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L288
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:288:33 | 288 | ... S::NAME.unwrap_or_else(|| CLASSIC_SHADOW), | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
redundant pattern matching, consider using `is_some()`: src/shadows/mod.rs#L285
warning: redundant pattern matching, consider using `is_some()` --> src/shadows/mod.rs:285:32 | 285 | if let Some(_) = delta.state { | -------^^^^^^^-------------- help: try this: `if delta.state.is_some()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L279
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:279:21 | 279 | S::NAME.unwrap_or_else(|| CLASSIC_SHADOW), | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L256
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:256:29 | 256 | ... S::NAME.unwrap_or_else(|| CLASSIC_SHADOW) | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
redundant pattern matching, consider using `is_some()`: src/shadows/mod.rs#L238
warning: redundant pattern matching, consider using `is_some()` --> src/shadows/mod.rs:238:39 | 238 | } else if let Some(_) = response.state.reported { | -------^^^^^^^-------------------------- help: try this: `if response.state.reported.is_some()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L230
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:230:33 | 230 | ... S::NAME.unwrap_or_else(|| CLASSIC_SHADOW) | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
redundant pattern matching, consider using `is_some()`: src/shadows/mod.rs#L227
warning: redundant pattern matching, consider using `is_some()` --> src/shadows/mod.rs:227:32 | 227 | if let Some(_) = response.state.delta { | -------^^^^^^^----------------------- help: try this: `if response.state.delta.is_some()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching = note: `#[warn(clippy::redundant_pattern_matching)]` on by default
this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`: src/shadows/mod.rs#L203
warning: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]` --> src/shadows/mod.rs:203:5 | 203 | / pub fn handle_message( 204 | | &mut self, 205 | | topic: &str, 206 | | payload: &[u8], 207 | | ) -> Result<(S, Option<S::PatchState>), Error> { | |__________________________________________________^ | = help: either add some descriptive text or remove the attribute = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use = note: `#[warn(clippy::double_must_use)]` on by default
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L97
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:97:13 | 97 | S::NAME.unwrap_or_else(|| CLASSIC_SHADOW), | ^^^^^^^^--------------------------------- | | | help: use `unwrap_or(..)` instead: `unwrap_or(CLASSIC_SHADOW)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
useless conversion to the same type: `shadows::topics::Topic`: src/shadows/topics.rs#L295
warning: useless conversion to the same type: `shadows::topics::Topic` --> src/shadows/topics.rs:295:26 | 295 | .map(|topic| Topic::from(*topic).format(thing_name, shadow_name)) | ^^^^^^^^^^^^^^^^^^^ help: consider removing `Topic::from()`: `(*topic)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `shadows::topics::Topic`: src/shadows/topics.rs#L233
warning: useless conversion to the same type: `shadows::topics::Topic` --> src/shadows/topics.rs:233:37 | 233 | .map(|(topic, qos)| Ok((Topic::from(*topic).format(thing_name, shadow_name)?, *qos))) | ^^^^^^^^^^^^^^^^^^^ help: consider removing `Topic::from()`: `(*topic)` | = 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
you are using an explicit closure for copying elements: src/shadows/topics.rs#L48
warning: you are using an explicit closure for copying elements --> src/shadows/topics.rs:48:22 | 48 | (tt.get(5).map(|s| *s), 6) | ^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `tt.get(5).copied()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone = note: `#[warn(clippy::map_clone)]` on by default
accessing first element with `tt.get(0)`: src/shadows/topics.rs#L44
warning: accessing first element with `tt.get(0)` --> src/shadows/topics.rs:44:16 | 44 | match (tt.get(0), tt.get(1), tt.get(2), tt.get(3)) { | ^^^^^^^^^ help: try: `tt.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str`: src/shadows/topics.rs#L42
warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` --> src/shadows/topics.rs:42:5 | 42 | / pub fn from_str(s: &str) -> Option<(Self, &str, Option<&str>)> { 43 | | let tt = s.splitn(9, '/').collect::<heapless::Vec<&str, 9>>(); 44 | | match (tt.get(0), tt.get(1), tt.get(2), tt.get(3)) { 45 | | (Some(&"$aws"), Some(&"things"), Some(thing_name), Some(&Self::SHADOW)) => { ... | 82 | | } 83 | | } | |_____^ | = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
deref which would be done by auto-deref: src/provisioning/topics.rs#L111
warning: deref which would be done by auto-deref --> src/provisioning/topics.rs:111:25 | 111 | *template_name, | ^^^^^^^^^^^^^^ help: try this: `template_name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
deref which would be done by auto-deref: src/provisioning/topics.rs#L102
warning: deref which would be done by auto-deref --> src/provisioning/topics.rs:102:25 | 102 | *template_name, | ^^^^^^^^^^^^^^ help: try this: `template_name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref = note: `#[warn(clippy::explicit_auto_deref)]` on by default
accessing first element with `tt.get(0)`: src/provisioning/topics.rs#L91
warning: accessing first element with `tt.get(0)` --> src/provisioning/topics.rs:91:16 | 91 | match (tt.get(0), tt.get(1)) { | ^^^^^^^^^ help: try: `tt.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str`: src/provisioning/topics.rs#L89
warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` --> src/provisioning/topics.rs:89:5 | 89 | / pub fn from_str(s: &'a str) -> Option<Self> { 90 | | let tt = s.splitn(6, '/').collect::<heapless::Vec<&str, 6>>(); 91 | | match (tt.get(0), tt.get(1)) { 92 | | (Some(&"$aws"), Some(&"provisioning-templates")) => { ... | 145 | | } 146 | | } | |_____^ | = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
the `Err`-variant returned from this function is very large: src/ota/state.rs#L292
warning: the `Err`-variant returned from this function is very large --> src/ota/state.rs:292:10 | 292 | ) -> Result<Interface, FileContext> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 768 bytes | = help: try reducing the size of `ota::encoding::FileContext`, for example by boxing large elements or replacing it with `Box<ota::encoding::FileContext>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err = note: `#[warn(clippy::result_large_err)]` on by default
this returns a `Result<_, ()>`: src/ota/encoding/cbor.rs#L75
warning: this returns a `Result<_, ()>` --> src/ota/encoding/cbor.rs:75:1 | 75 | pub fn to_slice<T>(value: &T, slice: &mut [u8]) -> Result<usize, ()> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err = note: `#[warn(clippy::result_unit_err)]` on by default
accessing first element with `tt.get(0)`: src/ota/data_interface/mqtt.rs#L53
warning: accessing first element with `tt.get(0)` --> src/ota/data_interface/mqtt.rs:53:21 | 53 | Some(match (tt.get(0), tt.get(1), tt.get(2), tt.get(3)) { | ^^^^^^^^^ help: try: `tt.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str`: src/ota/data_interface/mqtt.rs#L51
warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` --> src/ota/data_interface/mqtt.rs:51:5 | 51 | / pub fn from_str(s: &'a str) -> Option<Self> { 52 | | let tt = s.splitn(8, '/').collect::<heapless::Vec<&str, 8>>(); 53 | | Some(match (tt.get(0), tt.get(1), tt.get(2), tt.get(3)) { 54 | | (Some(&"$aws"), Some(&"things"), _, Some(&"streams")) => { ... | 70 | | }) 71 | | } | |_____^ | = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
unnecessary closure used with `bool::then`: src/jobs/update.rs#L166
warning: unnecessary closure used with `bool::then` --> src/jobs/update.rs:166:42 | 166 | include_job_execution_state: self.include_job_execution_state.then(|| true), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------- | | | help: use `then_some(..)` instead: `then_some(true)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
unnecessary closure used with `bool::then`: src/jobs/update.rs#L164
warning: unnecessary closure used with `bool::then` --> src/jobs/update.rs:164:35 | 164 | include_job_document: self.include_job_document.then(|| true), | ^^^^^^^^^^^^^^^^^^^^^^^^^^------------- | | | help: use `then_some(..)` instead: `then_some(true)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
accessing first element with `tt.get(0)`: src/jobs/subscribe.rs#L25
warning: accessing first element with `tt.get(0)` --> src/jobs/subscribe.rs:25:21 | 25 | Some(match (tt.get(0), tt.get(1), tt.get(2), tt.get(3)) { | ^^^^^^^^^ help: try: `tt.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `#[warn(clippy::get_first)]` on by default
method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str`: src/jobs/subscribe.rs#L23
warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` --> src/jobs/subscribe.rs:23:5 | 23 | / pub fn from_str(s: &'a str) -> Option<Self> { 24 | | let tt = s.splitn(8, '/').collect::<heapless::Vec<&str, 8>>(); 25 | | Some(match (tt.get(0), tt.get(1), tt.get(2), tt.get(3)) { 26 | | (Some(&"$aws"), Some(&"things"), _, Some(&"jobs")) => { ... | 55 | | }) 56 | | } | |_____^ | = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait = note: `#[warn(clippy::should_implement_trait)]` on by default
unnecessary closure used with `bool::then`: src/jobs/describe.rs#L91
warning: unnecessary closure used with `bool::then` --> src/jobs/describe.rs:91:35 | 91 | include_job_document: self.include_job_document.then(|| true), | ^^^^^^^^^^^^^^^^^^^^^^^^^^------------- | | | help: use `then_some(..)` instead: `then_some(true)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
unneeded `return` statement: shadow_derive/src/lib.rs#L211
warning: unneeded `return` statement --> shadow_derive/src/lib.rs:211:5 | 211 | / return quote! { 212 | | #[automatically_derived] 213 | | #[derive(Default, Clone, ::serde::Deserialize, ::serde::Serialize)] 214 | | #(#copy_attrs)* ... | 230 | | } 231 | | }; | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 211 ~ quote! { 212 + #[automatically_derived] 213 + #[derive(Default, Clone, ::serde::Deserialize, ::serde::Serialize)] 214 + #(#copy_attrs)* 215 + pub struct #optional_ident #generics { 216 + #( 217 + #optional_fields 218 + ),* 219 + } 220 + 221 + #[automatically_derived] 222 + impl #impl_generics rustot::shadows::ShadowPatch for #ident #ty_generics #where_clause { 223 + type PatchState = #optional_ident; 224 + 225 + fn apply_patch(&mut self, opt: Self::PatchState) { 226 + #( 227 + #assigners 228 + )* 229 + } 230 + } 231 ~ } |
called `is_some()` after searching an `Iterator` with `find`: shadow_derive/src/lib.rs#L156
warning: called `is_some()` after searching an `Iterator` with `find` --> shadow_derive/src/lib.rs:156:18 | 156 | .find(|a| a.path.is_ident("static_shadow_field")) | __________________^ 157 | | .is_some() | |__________________________^ help: use `any()` instead: `any(|a| a.path.is_ident("static_shadow_field"))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: shadow_derive/src/lib.rs#L136
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> shadow_derive/src/lib.rs:136:35 | 136 | fn create_optional_fields(fields: &Vec<Field>) -> Vec<proc_macro2::TokenStream> { | ^^^^^^^^^^^ help: change this to: `&[Field]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
called `is_some()` after searching an `Iterator` with `find`: shadow_derive/src/lib.rs#L121
warning: called `is_some()` after searching an `Iterator` with `find` --> shadow_derive/src/lib.rs:121:18 | 121 | .find(|a| a.path.is_ident("static_shadow_field")) | __________________^ 122 | | .is_some() | |__________________________^ help: use `any()` instead: `any(|a| a.path.is_ident("static_shadow_field"))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: shadow_derive/src/lib.rs#L112
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> shadow_derive/src/lib.rs:112:29 | 112 | fn create_assigners(fields: &Vec<Field>) -> Vec<proc_macro2::TokenStream> { | ^^^^^^^^^^^ help: change this to: `&[Field]` | = 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
called `is_some()` after searching an `Iterator` with `find`: shadow_derive/src/lib.rs#L83
warning: called `is_some()` after searching an `Iterator` with `find` --> shadow_derive/src/lib.rs:83:18 | 83 | .find(|a| attr.path.is_ident(a)) | __________________^ 84 | | .is_some() | |__________________________^ help: use `any()` instead: `any(|a| attr.path.is_ident(&a))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some = note: `#[warn(clippy::search_is_some)]` on by default
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
clippy
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Build & Test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Build & Test
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Integration Tests
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Integration Tests
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/