refactor: remove app::Message type from Graph

I wonder, given the description of canvas::Program,
would the graph be better as a true widget?

I'll have to learn how to actually implement a widget though.
This commit is contained in:
electria 2026-08-15 18:52:34 -07:00
commit ee4dc4f7b9
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -2,8 +2,6 @@ use std::collections::VecDeque;
use iced::{Color, Point, Renderer, Theme, mouse, widget::canvas}; use iced::{Color, Point, Renderer, Theme, mouse, widget::canvas};
use crate::app;
const CYAN: Color = Color::from_rgb8(0, 255, 255); const CYAN: Color = Color::from_rgb8(0, 255, 255);
#[derive(Default)] #[derive(Default)]
@ -33,7 +31,7 @@ impl Graph {
} }
} }
impl canvas::Program<app::Message, Theme, Renderer> for Graph { impl canvas::Program<(), Theme, Renderer> for Graph {
type State = (); type State = ();
fn draw( fn draw(
&self, &self,