From d18a0e43ac8513816c322296b03870af1e869b3d Mon Sep 17 00:00:00 2001 From: Tensor-Programming Date: Mon, 7 Oct 2019 07:15:33 -0400 Subject: [PATCH] Refactor(Tauri) Rust 2018 (#39) * update to 2018 * update to 2018 * update to 2018 * revert changes * refactor templates --- bindings/rust/rustfmt.toml | 2 +- lib/rust/build.rs | 2 -- lib/rust/rustfmt.toml | 2 +- lib/rust/src/lib.rs | 3 --- templates/rust/rustfmt.toml | 2 +- templates/rust/src/main.rs | 2 -- templates/rust/src/updater.rs | 4 ---- 7 files changed, 3 insertions(+), 14 deletions(-) diff --git a/bindings/rust/rustfmt.toml b/bindings/rust/rustfmt.toml index 9da25275e..45642c190 100644 --- a/bindings/rust/rustfmt.toml +++ b/bindings/rust/rustfmt.toml @@ -6,7 +6,7 @@ use_small_heuristics = "Default" reorder_imports = true reorder_modules = true remove_nested_parens = true -edition = "2015" +edition = "2018" merge_derives = true use_try_shorthand = false use_field_init_shorthand = false diff --git a/lib/rust/build.rs b/lib/rust/build.rs index 882bcfdf6..5356e76a2 100755 --- a/lib/rust/build.rs +++ b/lib/rust/build.rs @@ -1,5 +1,3 @@ -extern crate includedir_codegen; - use includedir_codegen::Compression; use std::env; diff --git a/lib/rust/rustfmt.toml b/lib/rust/rustfmt.toml index 9da25275e..45642c190 100644 --- a/lib/rust/rustfmt.toml +++ b/lib/rust/rustfmt.toml @@ -6,7 +6,7 @@ use_small_heuristics = "Default" reorder_imports = true reorder_modules = true remove_nested_parens = true -edition = "2015" +edition = "2018" merge_derives = true use_try_shorthand = false use_field_init_shorthand = false diff --git a/lib/rust/src/lib.rs b/lib/rust/src/lib.rs index 50d62d73a..19b8f1a59 100644 --- a/lib/rust/src/lib.rs +++ b/lib/rust/src/lib.rs @@ -7,9 +7,6 @@ mod macros; #[macro_use] extern crate lazy_static; -extern crate includedir; -extern crate phf; - pub mod api; mod app; pub mod command; diff --git a/templates/rust/rustfmt.toml b/templates/rust/rustfmt.toml index 9da25275e..45642c190 100644 --- a/templates/rust/rustfmt.toml +++ b/templates/rust/rustfmt.toml @@ -6,7 +6,7 @@ use_small_heuristics = "Default" reorder_imports = true reorder_modules = true remove_nested_parens = true -edition = "2015" +edition = "2018" merge_derives = true use_try_shorthand = false use_field_init_shorthand = false diff --git a/templates/rust/src/main.rs b/templates/rust/src/main.rs index d93870ed8..4f8ebccf0 100755 --- a/templates/rust/src/main.rs +++ b/templates/rust/src/main.rs @@ -1,7 +1,5 @@ mod cmd; -extern crate tauri; - #[macro_use] extern crate serde_derive; diff --git a/templates/rust/src/updater.rs b/templates/rust/src/updater.rs index 7f35cb988..a2eae3d84 100644 --- a/templates/rust/src/updater.rs +++ b/templates/rust/src/updater.rs @@ -1,7 +1,3 @@ -extern crate tauri; -extern crate serde_derive; -extern crate serde_json; - use crate::tauri::process::{ProcessExt, Signal, SystemExt}; fn update() -> Result<(), String> {