Skip to content

level: Add with_* functions for changing parametric type #101

level: Add with_* functions for changing parametric type

level: Add with_* functions for changing parametric type #101

Triggered via push March 28, 2024 17:15
Status Success
Total duration 31s
Artifacts

rustfmt.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

30 warnings
Rustfmt
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Rustfmt
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, 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/
Rustfmt
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/
Rustfmt
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/
Rustfmt
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/
Rustfmt
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/
you are explicitly cloning with `.map()`: src/response.rs#L79
warning: you are explicitly cloning with `.map()` --> src/response.rs:79:24 | 79 | let song = level | ________________________^ 80 | | .custom_song 81 | | .and_then(|song_id| songs.iter().find(|song| song.song_id == song_id)) 82 | | .map(Clone::clone); | |__________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone help: consider calling the dedicated `cloned` method | 79 ~ let song = level 80 + .custom_song 81 ~ .and_then(|song_id| songs.iter().find(|song| song.song_id == song_id)).cloned(); |
you are explicitly cloning with `.map()`: src/response.rs#L78
warning: you are explicitly cloning with `.map()` --> src/response.rs:78:27 | 78 | let creator = creators.iter().find(|creator| creator.user_id == level.creator).map(Clone::clone); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `creators.iter().find(|creator| creator.user_id == level.creator).cloned()` | = 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
direct implementation of `ToString`: src/request/user.rs#L117
warning: direct implementation of `ToString` --> src/request/user.rs:117:1 | 117 | / impl ToString for UserSearchRequest<'_> { 118 | | fn to_string(&self) -> String { 119 | | super::to_string(self) 120 | | } 121 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/request/user.rs#L54
warning: direct implementation of `ToString` --> src/request/user.rs:54:1 | 54 | / impl ToString for UserRequest<'_> { 55 | | fn to_string(&self) -> String { 56 | | super::to_string(self) 57 | | } 58 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/request/level.rs#L591
warning: direct implementation of `ToString` --> src/request/level.rs:591:1 | 591 | / impl ToString for LevelsRequest<'_> { 592 | | fn to_string(&self) -> String { 593 | | super::to_string(self) 594 | | } 595 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/request/level.rs#L92
warning: direct implementation of `ToString` --> src/request/level.rs:92:1 | 92 | / impl ToString for LevelRequest<'_> { 93 | | fn to_string(&self) -> String { 94 | | super::to_string(self) 95 | | } 96 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/request/comment.rs#L184
warning: direct implementation of `ToString` --> src/request/comment.rs:184:1 | 184 | / impl ToString for ProfileCommentsRequest<'_> { 185 | | fn to_string(&self) -> String { 186 | | super::to_string(self) 187 | | } 188 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/request/comment.rs#L116
warning: direct implementation of `ToString` --> src/request/comment.rs:116:1 | 116 | / impl ToString for LevelCommentsRequest<'_> { 117 | | fn to_string(&self) -> String { 118 | | super::to_string(self) 119 | | } 120 | | } | |_^ | = 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
bound is defined in more than one place: src/serde/ser/request.rs#L426
warning: bound is defined in more than one place --> src/serde/ser/request.rs:426:26 | 426 | fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error> | ^ 427 | where 428 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/request.rs#L408
warning: bound is defined in more than one place --> src/serde/ser/request.rs:408:20 | 408 | fn collect_str<T: ?Sized>(self, _value: &T) -> Result<Self::Ok, Self::Error> | ^ 409 | where 410 | T: Display, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/request.rs#L341
warning: bound is defined in more than one place --> src/serde/ser/request.rs:341:34 | 341 | fn serialize_newtype_variant<T: ?Sized>( | ^ ... 345 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/request.rs#L334
warning: bound is defined in more than one place --> src/serde/ser/request.rs:334:33 | 334 | fn serialize_newtype_struct<T: ?Sized>(self, _name: &'static str, _value: &T) -> Result<Self::Ok, Self::Error> | ^ 335 | where 336 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/request.rs#L315
warning: bound is defined in more than one place --> src/serde/ser/request.rs:315:23 | 315 | fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error> | ^ 316 | where 317 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/request.rs#L160
warning: bound is defined in more than one place --> src/serde/ser/request.rs:160:24 | 160 | fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T) -> Result<(), Self::Error> | ^ 161 | where 162 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/request.rs#L148
warning: bound is defined in more than one place --> src/serde/ser/request.rs:148:20 | 148 | fn collect_str<T: ?Sized>(self, _value: &T) -> Result<Self::Ok, Self::Error> | ^ 149 | where 150 | T: Display, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/request.rs#L107
warning: bound is defined in more than one place --> src/serde/ser/request.rs:107:34 | 107 | fn serialize_newtype_variant<T: ?Sized>( | ^ ... 111 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/request.rs#L100
warning: bound is defined in more than one place --> src/serde/ser/request.rs:100:33 | 100 | fn serialize_newtype_struct<T: ?Sized>(self, _name: &'static str, _value: &T) -> Result<Self::Ok, Self::Error> | ^ 101 | where 102 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/request.rs#L81
warning: bound is defined in more than one place --> src/serde/ser/request.rs:81:23 | 81 | fn serialize_some<T: ?Sized>(self, _value: &T) -> Result<Self::Ok, Self::Error> | ^ 82 | where 83 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/indexed.rs#L237
warning: bound is defined in more than one place --> src/serde/ser/indexed.rs:237:24 | 237 | fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T) -> Result<(), Self::Error> | ^ 238 | where 239 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/indexed.rs#L225
warning: bound is defined in more than one place --> src/serde/ser/indexed.rs:225:20 | 225 | fn collect_str<T: ?Sized>(self, _value: &T) -> Result<Self::Ok, Self::Error> | ^ 226 | where 227 | T: Display, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/indexed.rs#L183
warning: bound is defined in more than one place --> src/serde/ser/indexed.rs:183:34 | 183 | fn serialize_newtype_variant<T: ?Sized>( | ^ ... 187 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/indexed.rs#L176
warning: bound is defined in more than one place --> src/serde/ser/indexed.rs:176:33 | 176 | fn serialize_newtype_struct<T: ?Sized>(self, _name: &'static str, _value: &T) -> Result<Self::Ok, Self::Error> | ^ 177 | where 178 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: src/serde/ser/indexed.rs#L157
warning: bound is defined in more than one place --> src/serde/ser/indexed.rs:157:23 | 157 | fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error> | ^ 158 | where 159 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations = note: `#[warn(clippy::multiple_bound_locations)]` on by default
you are explicitly cloning with `.map()`: dash-rs-derive/src/utils.rs#L8
warning: you are explicitly cloning with `.map()` --> dash-rs-derive/src/utils.rs:8:26 | 8 | let first_lifetime = lifetime_iter.next().map(Clone::clone); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `lifetime_iter.next().cloned()` | = 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