From 1ba1d46eb258ad9396e65bd54078b70e849327cf Mon Sep 17 00:00:00 2001 From: Aaron Loucks Date: Sat, 25 May 2019 15:34:18 -0400 Subject: [PATCH] Update generator and examples to edition 2018 --- ash/src/lib.rs | 2 -- ash/tests/constant_size_arrays.rs | 2 +- ash/tests/display.rs | 2 +- examples/Cargo.toml | 1 + examples/src/bin/texture.rs | 4 ---- examples/src/bin/triangle.rs | 3 --- generator/src/bin/generator.rs | 2 +- generator/src/lib.rs | 12 ++++++------ 8 files changed, 10 insertions(+), 18 deletions(-) diff --git a/ash/src/lib.rs b/ash/src/lib.rs index 3641b93..caa2ad3 100644 --- a/ash/src/lib.rs +++ b/ash/src/lib.rs @@ -23,8 +23,6 @@ //! ``` //! -extern crate shared_library; - pub use crate::device::Device; pub use crate::entry::{Entry, EntryCustom, InstanceError, LoadingError}; pub use crate::instance::Instance; diff --git a/ash/tests/constant_size_arrays.rs b/ash/tests/constant_size_arrays.rs index f736c0a..74378e9 100644 --- a/ash/tests/constant_size_arrays.rs +++ b/ash/tests/constant_size_arrays.rs @@ -1,4 +1,4 @@ -extern crate ash; +use ash; use ash::vk::{PhysicalDeviceProperties, PipelineColorBlendStateCreateInfo}; diff --git a/ash/tests/display.rs b/ash/tests/display.rs index 8746022..6e46eda 100644 --- a/ash/tests/display.rs +++ b/ash/tests/display.rs @@ -1,4 +1,4 @@ -extern crate ash; + use ash::vk; #[test] diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 1ff2abf..27c4cea 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -2,6 +2,7 @@ name = "examples" version = "0.1.0" authors = ["maik klein "] +edition = "2018" [dependencies] winit = "0.16" diff --git a/examples/src/bin/texture.rs b/examples/src/bin/texture.rs index 42664a5..3fd0976 100644 --- a/examples/src/bin/texture.rs +++ b/examples/src/bin/texture.rs @@ -1,7 +1,3 @@ -extern crate ash; -extern crate examples; -extern crate image; - use std::default::Default; use std::ffi::CString; use std::fs::File; diff --git a/examples/src/bin/triangle.rs b/examples/src/bin/triangle.rs index 0104344..936dea5 100644 --- a/examples/src/bin/triangle.rs +++ b/examples/src/bin/triangle.rs @@ -1,6 +1,3 @@ -extern crate ash; -extern crate examples; - use ash::util::*; use ash::vk; use examples::*; diff --git a/generator/src/bin/generator.rs b/generator/src/bin/generator.rs index c639a2a..9ae054b 100644 --- a/generator/src/bin/generator.rs +++ b/generator/src/bin/generator.rs @@ -1,4 +1,4 @@ -extern crate generator; + use generator::write_source_code; use std::path::Path; diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 6050659..55368a7 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -1,14 +1,14 @@ #![recursion_limit = "256"] -extern crate heck; -extern crate itertools; + + #[macro_use] extern crate nom; -extern crate proc_macro2; +use proc_macro2; #[macro_use] extern crate quote; -extern crate syn; -pub extern crate vk_parse; -pub extern crate vkxml; +use syn; +pub use vk_parse; +pub use vkxml; use heck::{CamelCase, ShoutySnakeCase, SnakeCase}; use itertools::Itertools;