Skip to content

Commit ddde33f

Browse files
committed
chore(computegraph,viewport): implement trait in same order as defined
1 parent 69e31e6 commit ddde33f

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

crates/computegraph/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,16 +417,16 @@ where
417417
self
418418
}
419419

420+
fn as_ref(&self) -> &dyn SendSyncPartialEqAny {
421+
self
422+
}
423+
420424
fn partial_eq(&self, other: &dyn SendSyncPartialEqAny) -> bool {
421425
other
422426
.as_any()
423427
.downcast_ref::<T>()
424428
.map_or(false, |other| self == other)
425429
}
426-
427-
fn as_ref(&self) -> &dyn SendSyncPartialEqAny {
428-
self
429-
}
430430
}
431431

432432
impl fmt::Debug for Box<dyn SendSyncPartialEqAny> {

crates/viewport/src/lib.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,6 @@ impl<Message> shader::Program<Message> for Viewport {
9494

9595
type Primitive = ShaderPrimitive;
9696

97-
fn draw(
98-
&self,
99-
state: &Self::State,
100-
_cursor: iced::advanced::mouse::Cursor,
101-
_bounds: iced::Rectangle,
102-
) -> Self::Primitive {
103-
ShaderPrimitive {
104-
pipeline: self.pipeline.clone(),
105-
state: state.clone(),
106-
project_view: self.project_view.clone(),
107-
}
108-
}
109-
11097
fn update(
11198
&self,
11299
state: &mut Self::State,
@@ -133,6 +120,19 @@ impl<Message> shader::Program<Message> for Viewport {
133120
(iced::advanced::graphics::core::event::Status::Ignored, None)
134121
}
135122

123+
fn draw(
124+
&self,
125+
state: &Self::State,
126+
_cursor: iced::advanced::mouse::Cursor,
127+
_bounds: iced::Rectangle,
128+
) -> Self::Primitive {
129+
ShaderPrimitive {
130+
pipeline: self.pipeline.clone(),
131+
state: state.clone(),
132+
project_view: self.project_view.clone(),
133+
}
134+
}
135+
136136
fn mouse_interaction(
137137
&self,
138138
_state: &Self::State,

0 commit comments

Comments
 (0)