Bump octocrab from 0.42.0 to 0.42.1 (#477) #1442
clippy
5 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 5 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.82.0 (f6e511eec 2024-10-15)
- cargo 1.82.0 (8f40fc59f 2024-08-21)
- clippy 0.1.82 (f6e511e 2024-10-15)
Annotations
Check warning on line 232 in src/importers/icalendar.rs
github-actions / clippy
manual implementation of `Option::map`
warning: manual implementation of `Option::map`
--> src/importers/icalendar.rs:224:12
|
224 | } else if let Some(attendee) = event
| ____________^
225 | | .multi_properties()
226 | | .get("ATTENDEE")
227 | | .and_then(|attendees| attendees.first())
... |
231 | | None
232 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `#[warn(clippy::manual_map)]` on by default
help: try
|
224 ~ } else { event
225 + .multi_properties()
226 + .get("ATTENDEE")
227 ~ .and_then(|attendees| attendees.first()).map(|attendee| attendee.value().to_owned()) };
|
Check warning on line 182 in src/importers/icalendar/cdss.rs
github-actions / clippy
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> src/importers/icalendar/cdss.rs:177:5
|
177 | / match (event.city.as_str(), event.state.as_deref()) {
178 | | ("Henrico", Some("VA")) => {
179 | | event.city = "Richmond".to_string();
180 | | }
181 | | _ => {}
182 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
help: try
|
177 ~ if let ("Henrico", Some("VA")) = (event.city.as_str(), event.state.as_deref()) {
178 + event.city = "Richmond".to_string();
179 + }
|
Check warning on line 112 in src/importers/icalendar/cdss.rs
github-actions / clippy
accessing first element with `location_parts.get(0)`
warning: accessing first element with `location_parts.get(0)`
--> src/importers/icalendar/cdss.rs:112:17
|
112 | location_parts.get(0).cloned().unwrap_or_default(),
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `location_parts.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
Check warning on line 146 in src/importers/icalendar/balfolknl.rs
github-actions / clippy
you seem to be trying to use `match` for an equality check. Consider using `if`
warning: you seem to be trying to use `match` for an equality check. Consider using `if`
--> src/importers/icalendar/balfolknl.rs:143:9
|
143 | / match event.city.as_str() {
144 | | "Lent" => event.city = "Nijmegen".to_string(),
145 | | _ => {}
146 | | }
| |_________^ help: try: `if event.city.as_str() == "Lent" { event.city = "Nijmegen".to_string() }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
Check warning on line 141 in src/importers/icalendar/balfolknl.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/importers/icalendar/balfolknl.rs:141:35
|
141 | event.name = shorten_name(&raw_name);
| ^^^^^^^^^ help: change this to: `raw_name`
|
= 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