Add more links. #1372
clippy
4 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 4 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.81.0 (eeb90cda1 2024-09-04)
- cargo 1.81.0 (2dbb1af80 2024-08-20)
- clippy 0.1.81 (eeb90cd 2024-09-04)
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 113 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:113:17
|
113 | 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 145 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:142:9
|
142 | / match event.city.as_str() {
143 | | "Lent" => event.city = "Nijmegen".to_string(),
144 | | _ => {}
145 | | }
| |_________^ 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 140 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:140:35
|
140 | 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