Use associated type for Message in a canvas::Program
This commit is contained in:
parent
12c1a3f829
commit
c52fd089f1
7 changed files with 37 additions and 24 deletions
|
|
@ -235,7 +235,9 @@ impl Theme {
|
|||
}
|
||||
}
|
||||
|
||||
impl canvas::Program<Message> for Theme {
|
||||
impl canvas::Program for Theme {
|
||||
type Message = Message;
|
||||
|
||||
fn draw(&self, bounds: Rectangle, _cursor: Cursor) -> Vec<Geometry> {
|
||||
let theme = self.canvas_cache.draw(bounds.size(), |frame| {
|
||||
self.draw(frame);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue