From ab97e14ad76fe5ffe89ed526c6be411ddabc71a3 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Wed, 9 Aug 2023 14:04:48 -0400 Subject: [PATCH] Fix warnings --- dashboard/src/drawing/pie_chart.rs | 10 ---------- dashboard/src/main.rs | 5 ++--- dashboard/src/solstices.rs | 4 +++- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/dashboard/src/drawing/pie_chart.rs b/dashboard/src/drawing/pie_chart.rs index 4b0e7bb..918deb5 100644 --- a/dashboard/src/drawing/pie_chart.rs +++ b/dashboard/src/drawing/pie_chart.rs @@ -68,16 +68,6 @@ impl PieChart { end_angle, color, }| { - println!( - "wedge: {:.02?} {:.02?} {:.02?}", - start_angle, end_angle, color - ); - println!( - "wedge: {:.02?} {:.02?} [{:.02?}]", - start_angle + self.rotation, - end_angle + self.rotation, - self.rotation - ); context.move_to(self.center_x, self.center_y); context.set_source_rgb(color.r, color.g, color.b); context.arc( diff --git a/dashboard/src/main.rs b/dashboard/src/main.rs index c2724e8..fee8214 100644 --- a/dashboard/src/main.rs +++ b/dashboard/src/main.rs @@ -1,7 +1,7 @@ use chrono::{Datelike, Local, Utc}; use geo_types::{Latitude, Longitude}; use glib::Sender; -use gtk::{prelude::*, subclass::prelude::*, Orientation}; +use gtk::prelude::*; use ifc::IFC; use std::{ env, @@ -12,12 +12,11 @@ mod app_window; use app_window::ApplicationWindow; mod components; -use components::{Date, TransitClock}; mod drawing; mod soluna_client; -use soluna_client::{SolunaClient, SunMoon}; +use soluna_client::SolunaClient; mod solstices; use solstices::EVENTS; diff --git a/dashboard/src/solstices.rs b/dashboard/src/solstices.rs index 210be72..6a0943b 100644 --- a/dashboard/src/solstices.rs +++ b/dashboard/src/solstices.rs @@ -133,9 +133,11 @@ fn parse_events() -> Vec> { pub struct Solstices(HashMap); impl Solstices { + /* pub fn acquire(&self, year: i32) -> Option { self.0.get(&year).map(|c| c.clone()) } + */ pub fn next_event(&self, date: chrono::DateTime) -> Option { let year_events = self.0.get(&date.year()); @@ -152,7 +154,7 @@ impl Solstices { } else { self.0 .get(&(date.year() + 1)) - .map(|events| Event::SpringEquinox(year_events.spring_equinox.clone())) + .map(|_| Event::SpringEquinox(year_events.spring_equinox.clone())) } } None => None,