Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): bump thiserror from 2.0.7 to 2.0.8 #328

Closed
wants to merge 1 commit into from

fix(deps): bump thiserror from 2.0.7 to 2.0.8

e3a1f23
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Closed

fix(deps): bump thiserror from 2.0.7 to 2.0.8 #328

fix(deps): bump thiserror from 2.0.7 to 2.0.8
e3a1f23
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Dec 18, 2024 in 0s

clippy

2 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 2
Note 0
Help 0

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 170 in src/annotations.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> src/annotations.rs:161:5
    |
161 | /     return match obj.annotations().get(annotation.value(id).as_str()) {
162 | |         Some(value) => AnnotationResult {
163 | |             value: value.to_string(),
164 | |             default: false,
...   |
169 | |         },
170 | |     };
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
161 ~     match obj.annotations().get(annotation.value(id).as_str()) {
162 +         Some(value) => AnnotationResult {
163 +             value: value.to_string(),
164 +             default: false,
165 +         },
166 +         None => AnnotationResult {
167 +             value: annotation.default().unwrap_or("".to_string()),
168 +             default: true,
169 +         },
170 ~     }
    |

Check warning on line 153 in src/annotations.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> src/annotations.rs:126:5
    |
126 | /     return match obj.annotations().get(&length_v1) {
127 | |         Some(value) => {
128 | |             let length = value.parse::<i32>().unwrap() as usize;
129 | |             match length > 0 && length <= 100 {
...   |
152 | |         },
153 | |     };
    | |_____^
    |
    = 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`
    |
126 ~     match obj.annotations().get(&length_v1) {
127 +         Some(value) => {
128 +             let length = value.parse::<i32>().unwrap() as usize;
129 +             match length > 0 && length <= 100 {
130 +                 true => AnnotationResult {
131 +                     value: length,
132 +                     default: false,
133 +                 },
134 +                 false => {
135 +                     error!("Invalid length! Please set a length > 0 and <= 100. Proceeding with default length.");
136 +                     match V1Annotation::Length.default() {
137 +                         Some(default) => AnnotationResult {
138 +                             value: default.parse::<i32>().unwrap() as usize,
139 +                             default: true,
140 +                         },
141 +                         None => panic!("No default set for length! Panic!"),
142 +                     }
143 +                 }
144 +             }
145 +         }
146 +         None => match V1Annotation::Length.default() {
147 +             Some(default) => AnnotationResult {
148 +                 value: default.parse::<i32>().unwrap() as usize,
149 +                 default: true,
150 +             },
151 +             None => panic!("No default set for length! Panic!"),
152 +         },
153 ~     }
    |