From d9872f2615a11ce94deb85c8f1c215d69abd7992 Mon Sep 17 00:00:00 2001 From: mo8it Date: Tue, 18 Feb 2025 20:10:52 +0100 Subject: Upgrade to edition 2024 --- src/dev/new.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/dev/new.rs') diff --git a/src/dev/new.rs b/src/dev/new.rs index 154cd22..ba3517f 100644 --- a/src/dev/new.rs +++ b/src/dev/new.rs @@ -1,4 +1,4 @@ -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result, bail}; use std::{ env::set_current_dir, fs::{self, create_dir}, @@ -6,7 +6,7 @@ use std::{ process::Command, }; -use crate::{init::RUST_ANALYZER_TOML, CURRENT_FORMAT_VERSION}; +use crate::{CURRENT_FORMAT_VERSION, init::RUST_ANALYZER_TOML}; // Create a directory relative to the current directory and print its path. fn create_rel_dir(dir_name: &str, current_dir: &str) -> Result<()> { @@ -55,7 +55,9 @@ pub fn new(path: &Path, no_git: bool) -> Result<()> { write_rel_file( "info.toml", &dir_path_str, - format!("{INFO_FILE_BEFORE_FORMAT_VERSION}{CURRENT_FORMAT_VERSION}{INFO_FILE_AFTER_FORMAT_VERSION}"), + format!( + "{INFO_FILE_BEFORE_FORMAT_VERSION}{CURRENT_FORMAT_VERSION}{INFO_FILE_AFTER_FORMAT_VERSION}" + ), )?; write_rel_file("Cargo.toml", &dir_path_str, CARGO_TOML)?; @@ -130,7 +132,7 @@ bin = [] [package] name = "exercises" -edition = "2021" +edition = "2024" # Don't publish the exercises on crates.io! publish = false -- cgit v1.2.3