mirror of
https://github.com/Death916/deathclock.git
synced 2026-04-10 03:04:40 -07:00
cargo fmt
This commit is contained in:
parent
16e5bf3d5f
commit
008dbe785d
5 changed files with 15 additions and 15 deletions
|
|
@ -20,7 +20,12 @@ const WEATHER_UPDATE_TIME_MINS: u64 = 30;
|
||||||
|
|
||||||
pub fn main() -> iced::Result {
|
pub fn main() -> iced::Result {
|
||||||
iced::application(
|
iced::application(
|
||||||
|| (RustClock::default(), Task::perform(weather::get_weather(), Message::UpdateWeatherImg)), // Wrap it in a closure
|
|| {
|
||||||
|
(
|
||||||
|
RustClock::default(),
|
||||||
|
Task::perform(weather::get_weather(), Message::UpdateWeatherImg),
|
||||||
|
)
|
||||||
|
}, // Wrap it in a closure
|
||||||
RustClock::update,
|
RustClock::update,
|
||||||
RustClock::view,
|
RustClock::view,
|
||||||
)
|
)
|
||||||
|
|
@ -139,7 +144,6 @@ impl Default for RustClock {
|
||||||
.map(|(k, v)| (k, Handle::from_bytes(v)))
|
.map(|(k, v)| (k, Handle::from_bytes(v)))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|
||||||
RustClock {
|
RustClock {
|
||||||
current_time: Local::now(),
|
current_time: Local::now(),
|
||||||
next_alarm: None,
|
next_alarm: None,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ use rss::Channel;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::{BufRead, BufReader};
|
use std::io::{BufRead, BufReader};
|
||||||
|
|
||||||
|
|
||||||
pub async fn get_news() -> Vec<Channel> {
|
pub async fn get_news() -> Vec<Channel> {
|
||||||
let feeds = File::open("../feeds.txt");
|
let feeds = File::open("../feeds.txt");
|
||||||
let mut feed_vec = Vec::new();
|
let mut feed_vec = Vec::new();
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,9 @@ use chrono::Local;
|
||||||
use iced::Border;
|
use iced::Border;
|
||||||
use iced::Element;
|
use iced::Element;
|
||||||
use iced::Fill;
|
use iced::Fill;
|
||||||
|
use iced::widget::scrollable::{Direction, Scrollbar};
|
||||||
use iced::widget::{column, container, image, row, scrollable, text};
|
use iced::widget::{column, container, image, row, scrollable, text};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use iced::widget::scrollable::{Direction, Scrollbar};
|
|
||||||
|
|
||||||
|
|
||||||
use crate::Message;
|
use crate::Message;
|
||||||
use crate::sports::Game;
|
use crate::sports::Game;
|
||||||
|
|
@ -155,4 +154,3 @@ pub fn render_weather_pane<'a>(
|
||||||
.center_y(Fill)
|
.center_y(Fill)
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,3 @@ pub async fn get_weather() -> Handle {
|
||||||
let handle_type: Handle = handle.clone();
|
let handle_type: Handle = handle.clone();
|
||||||
assert_eq!(handle_type, handle);
|
assert_eq!(handle_type, handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue