Fix Dresden import again. #1630
Annotations
5 warnings
manual implementation of `Option::map`:
src/importers/icalendar.rs#L225
warning: manual implementation of `Option::map`
--> src/importers/icalendar.rs:225:12
|
225 | } else if let Some(attendee) = event
| ____________^
226 | | .multi_properties()
227 | | .get("ATTENDEE")
228 | | .and_then(|attendees| attendees.first())
... |
232 | | None
233 | | };
| |_____^
|
= 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
|
225 ~ } else { event
226 + .multi_properties()
227 + .get("ATTENDEE")
228 ~ .and_then(|attendees| attendees.first()).map(|attendee| attendee.value().to_owned()) };
|
|
accessing first element with `location_parts.get(0)`:
src/importers/icalendar/skandia.rs#L70
warning: accessing first element with `location_parts.get(0)`
--> src/importers/icalendar/skandia.rs:70:17
|
70 | 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
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
src/importers/icalendar/cdss.rs#L190
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> src/importers/icalendar/cdss.rs:190:5
|
190 | / match (event.city.as_str(), event.state.as_deref()) {
191 | | ("Henrico", Some("VA")) => {
192 | | event.city = "Richmond".to_string();
... |
195 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
help: try
|
190 ~ if let ("Henrico", Some("VA")) = (event.city.as_str(), event.state.as_deref()) {
191 + event.city = "Richmond".to_string();
192 + }
|
|
accessing first element with `location_parts.get(0)`:
src/importers/icalendar/cdss.rs#L117
warning: accessing first element with `location_parts.get(0)`
--> src/importers/icalendar/cdss.rs:117:17
|
117 | 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
|
you seem to be trying to use `match` for an equality check. Consider using `if`:
src/importers/icalendar/balfolknl.rs#L168
warning: you seem to be trying to use `match` for an equality check. Consider using `if`
--> src/importers/icalendar/balfolknl.rs:168:9
|
168 | / match event.city.as_str() {
169 | | "Lent" => event.city = "Nijmegen".to_string(),
170 | | _ => {}
171 | | }
| |_________^ 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
|