From ec56f8e0b6b9bacc0c093bb88594d6cba604b54c Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Thu, 12 Jan 2023 16:50:00 +0200 Subject: [PATCH] Update Rust edition to 2021. --- docs/book_examples/Cargo.toml | 5 ++++- druid-shell/Cargo.toml | 2 +- druid-shell/src/backend/web/window.rs | 1 - druid/Cargo.toml | 2 +- druid/examples/hello_web/Cargo.toml | 2 +- druid/examples/value_formatting/Cargo.toml | 5 ++++- druid/examples/web/Cargo.toml | 2 +- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/book_examples/Cargo.toml b/docs/book_examples/Cargo.toml index 195df7650d..75c5ee5fac 100644 --- a/docs/book_examples/Cargo.toml +++ b/docs/book_examples/Cargo.toml @@ -1,8 +1,11 @@ [package] name = "book_examples" version = "0.1.0" +license = "Apache-2.0" +repository = "https://github.com/linebender/druid" authors = ["Colin Rofls "] -edition = "2018" +edition = "2021" +publish = false [dependencies] druid = { path = "../../druid", features = [ "im" ] } diff --git a/druid-shell/Cargo.toml b/druid-shell/Cargo.toml index 7f41898d9d..a8b11d2333 100755 --- a/druid-shell/Cargo.toml +++ b/druid-shell/Cargo.toml @@ -7,7 +7,7 @@ description = "Platform abstracting application shell used for druid toolkit." repository = "https://github.com/linebender/druid" readme = "README.md" categories = ["os::macos-apis", "os::windows-apis", "gui"] -edition = "2018" +edition = "2021" [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"] diff --git a/druid-shell/src/backend/web/window.rs b/druid-shell/src/backend/web/window.rs index aac18117c3..042d400615 100644 --- a/druid-shell/src/backend/web/window.rs +++ b/druid-shell/src/backend/web/window.rs @@ -601,7 +601,6 @@ impl WindowHandle { } pub fn request_timer(&self, deadline: Instant) -> TimerToken { - use std::convert::TryFrom; let interval = deadline.duration_since(Instant::now()).as_millis(); let interval = match i32::try_from(interval) { Ok(iv) => iv, diff --git a/druid/Cargo.toml b/druid/Cargo.toml index 09896d0c6c..4cde95841e 100644 --- a/druid/Cargo.toml +++ b/druid/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/linebender/druid" categories = ["gui"] readme = "README.md" keywords = ["gui", "ui", "toolkit"] -edition = "2018" +edition = "2021" [package.metadata.docs.rs] # The "svg" and "image" features have doc clashes that cause undefined output in docs. diff --git a/druid/examples/hello_web/Cargo.toml b/druid/examples/hello_web/Cargo.toml index b4b742342b..5848029895 100644 --- a/druid/examples/hello_web/Cargo.toml +++ b/druid/examples/hello_web/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" license = "Apache-2.0" description = "Minimal web example" repository = "https://github.com/linebender/druid" -edition = "2018" +edition = "2021" publish = false [lib] diff --git a/druid/examples/value_formatting/Cargo.toml b/druid/examples/value_formatting/Cargo.toml index 4318065707..013fd97feb 100644 --- a/druid/examples/value_formatting/Cargo.toml +++ b/druid/examples/value_formatting/Cargo.toml @@ -1,8 +1,11 @@ [package] name = "value-formatting" version = "0.1.0" +license = "Apache-2.0" +repository = "https://github.com/linebender/druid" authors = ["Colin Rofls "] -edition = "2018" +edition = "2021" +publish = false [dependencies] druid = { path = "../../" } diff --git a/druid/examples/web/Cargo.toml b/druid/examples/web/Cargo.toml index cb6dc1ec53..8b9376049a 100644 --- a/druid/examples/web/Cargo.toml +++ b/druid/examples/web/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" license = "Apache-2.0" description = "Scaffolding for druid web examples" repository = "https://github.com/linebender/druid" -edition = "2018" +edition = "2021" publish = false [lib]