summaryrefslogtreecommitdiffstats
path: root/examples/solar_system/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/solar_system/src/main.rs')
-rw-r--r--examples/solar_system/src/main.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs
index 8d713ce0..5f90245c 100644
--- a/examples/solar_system/src/main.rs
+++ b/examples/solar_system/src/main.rs
@@ -11,7 +11,7 @@ use iced::executor;
use iced::theme::{self, Theme};
use iced::time;
use iced::widget::canvas;
-use iced::widget::canvas::{Cursor, Path, Stroke};
+use iced::widget::canvas::{Cursor, Path, Stroke, stroke};
use iced::window;
use iced::{
Application, Color, Command, Element, Length, Point, Rectangle, Settings,
@@ -19,7 +19,6 @@ use iced::{
};
use std::time::Instant;
-use crate::canvas::Style;
pub fn main() -> iced::Result {
SolarSystem::run(Settings {
@@ -85,7 +84,7 @@ impl Application for SolarSystem {
}
fn subscription(&self) -> Subscription<Message> {
- time::every(std::time::Duration::from_millis(10)).map(Message::Tick)
+ time::every(time::Duration::from_millis(10)).map(Message::Tick)
}
}
@@ -179,7 +178,7 @@ impl<Message> canvas::Program<Message> for State {
frame.stroke(
&orbit,
Stroke {
- style: Style::Solid(Color::from_rgba8(0, 153, 255, 0.1)),
+ style: stroke::Style::Solid(Color::from_rgba8(0, 153, 255, 0.1)),
width: 1.0,
line_dash: canvas::LineDash {
offset: 0,