From d1c619e5dc9409eb358dfaf141458a5b38edc02b Mon Sep 17 00:00:00 2001 From: xTeKc <81730792+xTeKc@users.noreply.github.com> Date: Sun, 12 Jun 2022 03:31:13 -0400 Subject: [PATCH 1/3] update edition --- rustfmt.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rustfmt.toml b/rustfmt.toml index 9071fb4b5..39b98f125 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,8 +1,8 @@ version = "Two" -edition = "2018" +edition = "2021" imports_granularity = "Crate" #use_small_heuristics = "Max" #control_brace_style = "ClosingNextLine" normalize_comments = true -format_code_in_doc_comments = true \ No newline at end of file +format_code_in_doc_comments = true From f287e757611ac2a84a8622bcf9b4a3d3cf60294b Mon Sep 17 00:00:00 2001 From: xTeKc <81730792+xTeKc@users.noreply.github.com> Date: Sun, 12 Jun 2022 03:31:35 -0400 Subject: [PATCH 2/3] update edition --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c869267b1..24493e787 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "dioxus-cli" version = "0.1.4" authors = ["Jonathan Kelley"] -edition = "2018" +edition = "2021" description = "CLI tool for developing, testing, and publishing Dioxus apps" license = "MIT/Apache-2.0" From bfab711010dd4f508930c3ce6af8f39c65c6c025 Mon Sep 17 00:00:00 2001 From: xTeKc <81730792+xTeKc@users.noreply.github.com> Date: Sun, 12 Jun 2022 03:35:25 -0400 Subject: [PATCH 3/3] force closure to take ownership --- src/server/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/mod.rs b/src/server/mod.rs index 1df13ca6a..ada3e10c7 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -79,7 +79,7 @@ pub async fn startup(config: CrateConfig) -> Result<()> { let file_service_config = config.clone(); let file_service = ServiceBuilder::new() .and_then( - |response: Response| async move { + move |response: Response| async move { let response = if file_service_config .dioxus_config .web