cargo fmt

This commit is contained in:
death916 2026-03-26 02:50:44 -07:00
parent 16e5bf3d5f
commit 008dbe785d
5 changed files with 15 additions and 15 deletions

View file

@ -20,7 +20,12 @@ const WEATHER_UPDATE_TIME_MINS: u64 = 30;
pub fn main() -> iced::Result {
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::view,
)
@ -139,7 +144,6 @@ impl Default for RustClock {
.map(|(k, v)| (k, Handle::from_bytes(v)))
.collect();
RustClock {
current_time: Local::now(),
next_alarm: None,

View file

@ -2,7 +2,6 @@ use rss::Channel;
use std::fs::File;
use std::io::{BufRead, BufReader};
pub async fn get_news() -> Vec<Channel> {
let feeds = File::open("../feeds.txt");
let mut feed_vec = Vec::new();

View file

@ -2,10 +2,9 @@ use chrono::Local;
use iced::Border;
use iced::Element;
use iced::Fill;
use iced::widget::scrollable::{Direction, Scrollbar};
use iced::widget::{column, container, image, row, scrollable, text};
use std::collections::HashMap;
use iced::widget::scrollable::{Direction, Scrollbar};
use crate::Message;
use crate::sports::Game;
@ -121,7 +120,7 @@ pub fn render_mlb_pane<'a>(
})
.into()
})))
.direction(Direction::Vertical(Scrollbar::hidden()))
.direction(Direction::Vertical(Scrollbar::hidden()))
.into()
}
@ -155,4 +154,3 @@ pub fn render_weather_pane<'a>(
.center_y(Fill)
.into()
}

View file

@ -18,9 +18,8 @@ pub async fn get_weather() -> Handle {
#[tokio::test]
async fn test_get_weather() {
let handle = get_weather().await;
let handle_type: Handle = handle.clone();
assert_eq!(handle_type, handle);
}
async fn test_get_weather() {
let handle = get_weather().await;
let handle_type: Handle = handle.clone();
assert_eq!(handle_type, handle);
}