diff --git a/examples/Cargo.toml b/examples/Cargo.toml index f1f8b4c6d..3df37246c 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["creative", "sketch", "graphics", "audio", "example"] license = "MIT" repository = "https://github.com/nannou-org/nannou.git" homepage = "https://github.com/nannou-org/nannou" -edition = "2018" +edition = "2021" [dev-dependencies] async-std = "1.10.0" diff --git a/examples/laser/laser_frame_stream_gui.rs b/examples/laser/laser_frame_stream_gui.rs index f8e11f043..f4f06ee4b 100644 --- a/examples/laser/laser_frame_stream_gui.rs +++ b/examples/laser/laser_frame_stream_gui.rs @@ -278,7 +278,7 @@ fn raw_window_event(_app: &App, model: &mut Model, event: &nannou::winit::event: fn update(_app: &App, model: &mut Model, update: Update) { // First, check for new laser DACs. - for dac in model.dac_rx.try_recv() { + while let Ok(dac) = model.dac_rx.try_recv() { println!("Detected DAC {:?}!", dac.id()); let stream = model .laser_api diff --git a/generative_design/Cargo.toml b/generative_design/Cargo.toml index 4d0cb3291..52b400dd5 100644 --- a/generative_design/Cargo.toml +++ b/generative_design/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["creative", "sketch", "generative", "design", "gestaltung"] license = "MIT" repository = "https://github.com/nannou-org/nannou.git" homepage = "https://github.com/nannou-org/nannou" -edition = "2018" +edition = "2021" [dev-dependencies] nannou = { version ="0.18.0", path = "../nannou" } diff --git a/guide/book_tests/Cargo.toml b/guide/book_tests/Cargo.toml index 8f508c04c..5a2235658 100644 --- a/guide/book_tests/Cargo.toml +++ b/guide/book_tests/Cargo.toml @@ -2,7 +2,7 @@ name = 'book_tests' version = '0.1.0' authors = ['mitchmindtree '] -edition = '2018' +edition = '2021' description = 'For testing the nannou-guide, while including the nannou dependencies.' [build-dependencies] diff --git a/nannou/Cargo.toml b/nannou/Cargo.toml index 3d50152bf..ebf25337c 100644 --- a/nannou/Cargo.toml +++ b/nannou/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["creative", "sketch", "graphics", "audio"] license = "MIT" repository = "https://github.com/nannou-org/nannou.git" homepage = "https://github.com/nannou-org/nannou" -edition = "2018" +edition = "2021" [dependencies] async-std = "1.10.0" diff --git a/nannou/src/app.rs b/nannou/src/app.rs index 6fd899182..06ffa0c72 100644 --- a/nannou/src/app.rs +++ b/nannou/src/app.rs @@ -1028,7 +1028,7 @@ impl EventLoopWindowTarget { // This method is solely used during `window::Builder::build` to allow for pub(crate) fn as_ref(&self) -> &winit::event_loop::EventLoopWindowTarget<()> { match *self { - EventLoopWindowTarget::Owned(ref event_loop) => (&**event_loop), + EventLoopWindowTarget::Owned(ref event_loop) => &**event_loop, EventLoopWindowTarget::Pointer(ptr) => { // This cast is safe, assuming that the `App`'s `EventLoopWindowTarget` will only // ever be in the `Pointer` state while the pointer is valid - that is, during the diff --git a/nannou_audio/Cargo.toml b/nannou_audio/Cargo.toml index 56553a02b..5ab99f5a4 100644 --- a/nannou_audio/Cargo.toml +++ b/nannou_audio/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["audio", "stream", "cross-platform", "dsp", "pcm"] license = "MIT" repository = "https://github.com/nannou-org/nannou_audio.git" homepage = "https://nannou.cc" -edition = "2018" +edition = "2021" [dependencies] cpal = "0.13.1" diff --git a/nannou_core/Cargo.toml b/nannou_core/Cargo.toml index 8cbdd3896..a80fa0103 100644 --- a/nannou_core/Cargo.toml +++ b/nannou_core/Cargo.toml @@ -7,7 +7,7 @@ readme = "README.md" license = "MIT" repository = "https://github.com/nannou-org/nannou.git" homepage = "https://nannou.cc" -edition = "2018" +edition = "2021" [dependencies] glam = { version = "0.17", default-features = false, features = ["num-traits", "rand"] } diff --git a/nannou_egui/Cargo.toml b/nannou_egui/Cargo.toml index b2776bff2..6e330ab42 100644 --- a/nannou_egui/Cargo.toml +++ b/nannou_egui/Cargo.toml @@ -5,7 +5,7 @@ authors = [ "Alexandru Ene ", "mitchmindtree ", ] -edition = "2018" +edition = "2021" license = "MIT/Apache-2.0" description = "egui integration for nannou" repository = "https://github.com/AlexEne/nannou_egui" diff --git a/nannou_egui_demo_app/Cargo.toml b/nannou_egui_demo_app/Cargo.toml index cf12f3769..8da3b8e58 100644 --- a/nannou_egui_demo_app/Cargo.toml +++ b/nannou_egui_demo_app/Cargo.toml @@ -2,7 +2,7 @@ name = "nannou_egui_demo_app" version = "0.1.0" authors = ["mitchmindtree "] -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/nannou_isf/Cargo.toml b/nannou_isf/Cargo.toml index 475fef286..ccc1c22ac 100644 --- a/nannou_isf/Cargo.toml +++ b/nannou_isf/Cargo.toml @@ -2,7 +2,7 @@ name = "nannou_isf" version = "0.1.0" authors = ["mitchmindtree "] -edition = "2018" +edition = "2021" [dependencies] hotglsl = { git = "https://github.com/nannou-org/hotglsl", branch = "master" } diff --git a/nannou_laser/Cargo.toml b/nannou_laser/Cargo.toml index 553a0e65d..048be5cc5 100644 --- a/nannou_laser/Cargo.toml +++ b/nannou_laser/Cargo.toml @@ -3,7 +3,7 @@ name = "nannou_laser" version ="0.18.0" authors = ["mitchmindtree "] description = "A cross-platform laser DAC detection and streaming API." -edition = "2018" +edition = "2021" keywords = ["laser", "dac", "stream", "frame", "ether-dream"] license = "MIT OR Apache-2.0" repository = "https://github.com/nannou-org/nannou_laser.git" diff --git a/nannou_mesh/Cargo.toml b/nannou_mesh/Cargo.toml index 57a5f6421..80e9badb5 100644 --- a/nannou_mesh/Cargo.toml +++ b/nannou_mesh/Cargo.toml @@ -7,7 +7,7 @@ readme = "README.md" license = "MIT" repository = "https://github.com/nannou-org/nannou.git" homepage = "https://nannou.cc" -edition = "2018" +edition = "2021" [dependencies] nannou_core = { version ="0.18.0", path = "../nannou_core" } diff --git a/nannou_new/Cargo.toml b/nannou_new/Cargo.toml index e5bb73148..25acb4aa5 100644 --- a/nannou_new/Cargo.toml +++ b/nannou_new/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["tool", "build", "nannou", "creative", "sketch"] license = "MIT" repository = "https://github.com/nannou-org/nannou.git" homepage = "https://github.com/nannou-org/nannou/tree/master/nannou_new" -edition = "2018" +edition = "2021" [dependencies] cargo = "0.42" # For retrieving the latest `nannou` version and working with cargo-clone. diff --git a/nannou_osc/Cargo.toml b/nannou_osc/Cargo.toml index 2ac7ec553..0472f7c92 100644 --- a/nannou_osc/Cargo.toml +++ b/nannou_osc/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["OSC", "protocol", "cross-platform", "UDP", "socket"] license = "MIT OR Apache-2.0" repository = "https://github.com/nannou-org/nannou_osc.git" homepage = "https://nannou.cc" -edition = "2018" +edition = "2021" [dependencies] rosc = "0.1" diff --git a/nannou_package/Cargo.toml b/nannou_package/Cargo.toml index 733aa2623..496a16e57 100644 --- a/nannou_package/Cargo.toml +++ b/nannou_package/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["package", "build", "creative", "sketch"] license = "MIT" repository = "https://github.com/nannou-org/nannou.git" homepage = "https://github.com/nannou-org/nannou" -edition = "2018" +edition = "2021" [dependencies] chrono = "0.4" diff --git a/nannou_wgpu/Cargo.toml b/nannou_wgpu/Cargo.toml index a2057ca71..5239e2296 100644 --- a/nannou_wgpu/Cargo.toml +++ b/nannou_wgpu/Cargo.toml @@ -7,7 +7,7 @@ readme = "README.md" license = "MIT" repository = "https://github.com/nannou-org/nannou.git" homepage = "https://nannou.cc" -edition = "2018" +edition = "2021" [dependencies] async-std = "1.10.0" diff --git a/nature_of_code/Cargo.toml b/nature_of_code/Cargo.toml index aef3faa1a..024841d5f 100644 --- a/nature_of_code/Cargo.toml +++ b/nature_of_code/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["creative", "sketch", "nature", "code", "processing"] license = "MIT" repository = "https://github.com/nannou-org/nannou.git" homepage = "https://github.com/nannou-org/nannou" -edition = "2018" +edition = "2021" [dev-dependencies] nannou = { version ="0.18.0", path = "../nannou" } diff --git a/scripts/set_version/Cargo.toml b/scripts/set_version/Cargo.toml index 22417537f..b1b87136d 100644 --- a/scripts/set_version/Cargo.toml +++ b/scripts/set_version/Cargo.toml @@ -3,7 +3,7 @@ name = "set_version" version = "0.1.0" authors = ["mitchmindtree "] description = "A small tool for setting a new version across all nannou crates." -edition = "2018" +edition = "2021" [[bin]] name = "set_version"