Cargo clippy fixes
This commit is contained in:
parent
4529886370
commit
c306dc03fe
@ -1,11 +1,10 @@
|
||||
use iced::{
|
||||
Alignment, Background, Border, Color, Font, Length, Point, Settings, Shadow, Size, Task,
|
||||
Vector,
|
||||
Background, Border, Color, Font, Length, Point, Shadow, Size, Task,
|
||||
alignment::{Horizontal, Vertical},
|
||||
application::Appearance,
|
||||
border,
|
||||
font::Family,
|
||||
widget::{Column, Container, Row, Text, container},
|
||||
widget::{Column, Row, Text, container},
|
||||
window,
|
||||
};
|
||||
use owm_rs::free_api_v25::current::WeatherResponse;
|
||||
@ -41,8 +40,9 @@ impl WeatherPopup {
|
||||
.resp
|
||||
.weather
|
||||
.first()
|
||||
.map(|w| (w.main.clone(), w.description.clone(), w.icon.clone()))
|
||||
.unwrap_or(("N/A".into(), "N/A".into(), String::new()));
|
||||
.map_or(("N/A".into(), "N/A".into(), String::new()), |w| {
|
||||
(w.main.clone(), w.description.clone(), w.icon.clone())
|
||||
});
|
||||
let temp = self.resp.main.as_ref().and_then(|m| m.temp).unwrap_or(0.0);
|
||||
let temperature = format!("{temp:.1}");
|
||||
let unit = match self.conf.query_params.units.as_str() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user