summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-11-14 14:43:02 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-11-14 14:43:02 +0100
commit34b5cb75ef9f97076dd9e306d8afb68058176883 (patch)
tree6f8e529480fbe69b0292e2ec999776c96e034f7c /examples
parent9ddfaf3ee73cef3e7bd122f4d11893f77647c2c3 (diff)
downloadiced-34b5cb75ef9f97076dd9e306d8afb68058176883.tar.gz
iced-34b5cb75ef9f97076dd9e306d8afb68058176883.tar.bz2
iced-34b5cb75ef9f97076dd9e306d8afb68058176883.zip
Remove `Default` implementation in `custom_shader` example
Diffstat (limited to 'examples')
-rw-r--r--examples/custom_shader/src/main.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/examples/custom_shader/src/main.rs b/examples/custom_shader/src/main.rs
index f90061d7..f4853507 100644
--- a/examples/custom_shader/src/main.rs
+++ b/examples/custom_shader/src/main.rs
@@ -28,15 +28,6 @@ struct IcedCubes {
scene: Scene,
}
-impl Default for IcedCubes {
- fn default() -> Self {
- Self {
- start: Instant::now(),
- scene: Scene::new(),
- }
- }
-}
-
#[derive(Debug, Clone)]
enum Message {
CubeAmountChanged(u32),
@@ -53,7 +44,13 @@ impl Application for IcedCubes {
type Flags = ();
fn new(_flags: Self::Flags) -> (Self, Command<Self::Message>) {
- (IcedCubes::default(), Command::none())
+ (
+ Self {
+ start: Instant::now(),
+ scene: Scene::new(),
+ },
+ Command::none(),
+ )
}
fn title(&self) -> String {