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