Skip to content

Allow the closure in PersistentShadow::update to return a bool, indic… #180

Allow the closure in PersistentShadow::update to return a bool, indic…

Allow the closure in PersistentShadow::update to return a bool, indic… #180

Triggered via push September 22, 2023 08:37
Status Success
Total duration 4m 5s
Artifacts

ci.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

52 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/
unnecessary closure used to substitute value for `Option::None`: src/shadows/mod.rs#L565
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:565:13 | 565 | 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#L507
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:507:21 | 507 | 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#L490
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:490:33 | 490 | ... 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#L487
warning: redundant pattern matching, consider using `is_some()` --> src/shadows/mod.rs:487:32 | 487 | 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#L481
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:481:21 | 481 | 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#L458
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:458:29 | 458 | ... 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#L442
warning: redundant pattern matching, consider using `is_some()` --> src/shadows/mod.rs:442:39 | 442 | } 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#L435
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:435:33 | 435 | ... 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#L432
warning: redundant pattern matching, consider using `is_some()` --> src/shadows/mod.rs:432:32 | 432 | 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#L410
warning: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]` --> src/shadows/mod.rs:410:5 | 410 | / pub fn handle_message( 411 | | &mut self, 412 | | topic: &str, 413 | | payload: &[u8], 414 | | ) -> 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#L302
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:302:21 | 302 | 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#L285
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:285:33 | 285 | ... 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#L282
warning: redundant pattern matching, consider using `is_some()` --> src/shadows/mod.rs:282:32 | 282 | 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#L276
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:276:21 | 276 | 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#L253
warning: unnecessary closure used to substitute value for `Option::None` --> src/shadows/mod.rs:253:29 | 253 | ... 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#L237
warning: redundant pattern matching, consider using `is_some()` --> src/shadows/mod.rs:237:39 | 237 | } 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#L241
warning: unneeded `return` statement --> shadow_derive/src/lib.rs:241:5 | 241 | / return quote! { 242 | | #[automatically_derived] 243 | | impl #impl_generics rustot::shadows::ShadowPatch for #ident #ty_generics #where_clause { 244 | | type PatchState = #ident #ty_generics; ... | 249 | | } 250 | | }; | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 241 ~ quote! { 242 + #[automatically_derived] 243 + impl #impl_generics rustot::shadows::ShadowPatch for #ident #ty_generics #where_clause { 244 + type PatchState = #ident #ty_generics; 245 + 246 + fn apply_patch(&mut self, opt: Self::PatchState) { 247 + *self = opt; 248 + } 249 + } 250 ~ } |
this expression creates a reference which is immediately dereferenced by the compiler: shadow_derive/src/lib.rs#L209
warning: this expression creates a reference which is immediately dereferenced by the compiler --> shadow_derive/src/lib.rs:209:50 | 209 | let optional_fields = create_optional_fields(&shadow_fields); | ^^^^^^^^^^^^^^ help: change this to: `shadow_fields` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: shadow_derive/src/lib.rs#L208
warning: this expression creates a reference which is immediately dereferenced by the compiler --> shadow_derive/src/lib.rs:208:38 | 208 | let assigners = create_assigners(&shadow_fields); | ^^^^^^^^^^^^^^ help: change this to: `shadow_fields` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` 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 ~ } |
unneeded `return` statement: shadow_derive/src/lib.rs#L186
warning: unneeded `return` statement --> shadow_derive/src/lib.rs:186:5 | 186 | / return quote! { 187 | | #[automatically_derived] 188 | | impl #impl_generics rustot::shadows::ShadowState for #ident #ty_generics #where_clause { 189 | | const NAME: Option<&'static str> = #name; 190 | | // const MAX_PAYLOAD_SIZE: usize = 512; 191 | | } 192 | | }; | |_____^ | = 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` | 186 ~ quote! { 187 + #[automatically_derived] 188 + impl #impl_generics rustot::shadows::ShadowState for #ident #ty_generics #where_clause { 189 + const NAME: Option<&'static str> = #name; 190 + // const MAX_PAYLOAD_SIZE: usize = 512; 191 + } 192 ~ } |
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/
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/
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/