diff --git a/Cargo.toml b/Cargo.toml index b5a0fe4c7d..61bf0bfe3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -147,9 +147,9 @@ codegen-units = 8 incremental = false debug = false -[profile.ephemeral-coverage] -inherits = "ephemeral-build" -debug = true +# [profile.ephemeral-coverage] +# inherits = "ephemeral-build" +# debug = true [profile.release-with-debug] inherits = "release" diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index c69109c5e5..82b3745d46 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -109,7 +109,7 @@ fn script_benchmarks(criterion: &mut Criterion, filter: Option) { } for (group, tests) in grouped { - println!("Running benchmarks for group: {}", group); + println!("Running benchmarks for group: {group}"); let mut benchmark_group = criterion.benchmark_group(group); for t in tests { diff --git a/crates/bevy_mod_scripting_core/src/asset.rs b/crates/bevy_mod_scripting_core/src/asset.rs index c077ce82e6..f3135f55b4 100644 --- a/crates/bevy_mod_scripting_core/src/asset.rs +++ b/crates/bevy_mod_scripting_core/src/asset.rs @@ -431,7 +431,7 @@ mod tests { LoadState::NotLoaded => panic!("Asset not loaded"), LoadState::Loaded => {} LoadState::Failed(asset_load_error) => { - panic!("Asset load failed: {:?}", asset_load_error) + panic!("Asset load failed: {asset_load_error:?}") } _ => panic!("Unexpected load state"), } @@ -532,7 +532,7 @@ mod tests { mut event_target: ResMut| { println!("Reading asset events this frame"); for event in reader.read() { - println!("{:?}", event); + println!("{event:?}"); if matches!( (event_target.event, event), (AssetEvent::Added { .. }, AssetEvent::Added { .. }) diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/namespace.rs b/crates/bevy_mod_scripting_core/src/bindings/function/namespace.rs index 390393abfb..203cf94bf6 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/namespace.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/namespace.rs @@ -50,7 +50,7 @@ impl Namespace { pub fn prefix(self) -> Cow<'static, str> { match self { Namespace::Global => Cow::Borrowed(""), - Namespace::OnType(type_id) => Cow::Owned(format!("{:?}::", type_id)), + Namespace::OnType(type_id) => Cow::Owned(format!("{type_id:?}::")), } } diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs b/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs index 0b255995dd..aeaaa5b081 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs @@ -463,7 +463,7 @@ impl ScriptFunctionRegistry { if i == 0 { self.get_function(namespace, name.clone()) } else { - let name: Cow<'static, str> = format!("{}-{i}", name).into(); + let name: Cow<'static, str> = format!("{name}-{i}").into(); self.get_function(namespace, name) } }) diff --git a/crates/bevy_mod_scripting_core/src/bindings/pretty_print.rs b/crates/bevy_mod_scripting_core/src/bindings/pretty_print.rs index 72e9d808a9..385c4a61eb 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/pretty_print.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/pretty_print.rs @@ -90,7 +90,7 @@ impl ReflectReferencePrinter { if let Some(tail_type_id) = tail_type_id { let type_path = tail_type_id.display_with_world(world); - pretty_path.push_str(&format!(" -> {}", type_path)); + pretty_path.push_str(&format!(" -> {type_path}")); } } else { Self::pretty_print_base(&self.reference.base, None, &mut pretty_path); @@ -111,7 +111,7 @@ impl ReflectReferencePrinter { self.pretty_print_value_inner(r, &mut output); }) .unwrap_or_else(|e| { - output.push_str(&format!("", e)); + output.push_str(&format!("")); }); } None => { @@ -131,12 +131,12 @@ impl ReflectReferencePrinter { }; let base_kind = match base.base_id { - ReflectBase::Component(e, _) => format!("Component on entity {}", e), + ReflectBase::Component(e, _) => format!("Component on entity {e}"), ReflectBase::Resource(_) => "Resource".to_owned(), - ReflectBase::Owned(ref id) => format!("Allocation({})", id), + ReflectBase::Owned(ref id) => format!("Allocation({id})"), }; - out.push_str(&format!("{}({})", base_kind, type_path)); + out.push_str(&format!("{base_kind}({type_path})")); } /// Pretty prints a value of an opaque type. @@ -317,7 +317,7 @@ impl ReflectReferencePrinter { // for function_reflection from bevy or other feature gated things #[allow(unreachable_patterns)] _ => { - output.push_str(&format!("{:?}", v)); + output.push_str(&format!("{v:?}")); } } } @@ -414,7 +414,7 @@ impl DisplayWithWorld for ComponentId { .map(|info| info.name()); match component_name { - Some(n) => format!("ComponentOrResource({})", n), + Some(n) => format!("ComponentOrResource({n})"), None => "ComponentOrResource()".to_owned(), } } @@ -450,14 +450,14 @@ impl DisplayWithWorld for ReflectAccessId { if let Some(allocation) = allocator.get(&allocation_id) { let ptr = allocation.get_ptr(); let val = unsafe { &*ptr }; - let o = format!("Allocation({:?})", val); + let o = format!("Allocation({val:?})"); unsafe { world.release_access(raid) }; o } else { - format!("Allocation({})", allocation_id) + format!("Allocation({allocation_id})") } } else { - format!("Allocation({})", allocation_id) + format!("Allocation({allocation_id})") } } super::access_map::ReflectAccessKind::Global => "Global".to_owned(), @@ -491,7 +491,7 @@ impl DisplayWithWorld for TypeId { } fn display_without_world(&self) -> String { - format!("{:?}", self) + format!("{self:?}") } } #[profiling::all_functions] @@ -687,7 +687,7 @@ mod test { let type_id = TypeId::of::(); assert_eq!(type_id.display_with_world(world.clone()), "usize"); assert_eq!(type_id.display_value_with_world(world.clone()), "usize"); - assert_eq!(type_id.display_without_world(), format!("{:?}", type_id)); + assert_eq!(type_id.display_without_world(), format!("{type_id:?}")); let type_id = TypeId::of::(); assert_eq!(type_id.display_with_world(world.clone()), "Unknown Type"); @@ -695,7 +695,7 @@ mod test { type_id.display_value_with_world(world.clone()), "Unknown Type" ); - assert_eq!(type_id.display_without_world(), format!("{:?}", type_id)); + assert_eq!(type_id.display_without_world(), format!("{type_id:?}")); } #[test] @@ -729,7 +729,7 @@ mod test { type_id, } .display_without_world(), - format!("Allocation(0)({:?})", type_id) + format!("Allocation(0)({type_id:?})") ); } @@ -763,7 +763,7 @@ mod test { assert_eq!( reflect_reference.display_without_world(), - format!("", type_id) + format!("") ); } diff --git a/crates/bevy_mod_scripting_core/src/bindings/schedule.rs b/crates/bevy_mod_scripting_core/src/bindings/schedule.rs index 4e04dbdc78..061029a46a 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/schedule.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/schedule.rs @@ -307,7 +307,7 @@ mod tests { if let Some(system) = graph.get_system_at(node_id) { system.name().clone().to_string() } else if let Some(system_set) = graph.get_set_at(node_id) { - format!("{:?}", system_set).to_string() + format!("{system_set:?}").to_string() } else { // try schedule systems let mut default = format!("{node_id:?}").to_string(); @@ -352,10 +352,7 @@ mod tests { for &(exp_from, exp_to) in expected_edges { assert!( found_edges.contains(&(exp_from.to_owned(), exp_to.to_owned())), - "Expected edge ({} -> {}) not found. Found edges: {:?}", - exp_from, - exp_to, - found_edges + "Expected edge ({exp_from} -> {exp_to}) not found. Found edges: {found_edges:?}" ); } diff --git a/crates/bevy_mod_scripting_core/src/bindings/script_system.rs b/crates/bevy_mod_scripting_core/src/bindings/script_system.rs index ab840e9593..c523b0d231 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/script_system.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/script_system.rs @@ -538,7 +538,7 @@ impl System for DynamicScriptSystem

{ reason = "WIP, to be dealt with in validate params better, but panic will still remain" )] if subset.contains(&raid) { - panic!("Duplicate resource access in system: {:?}.", raid); + panic!("Duplicate resource access in system: {raid:?}."); } subset.insert(raid); } diff --git a/crates/bevy_mod_scripting_core/src/commands.rs b/crates/bevy_mod_scripting_core/src/commands.rs index 57b37195a9..95ea651b03 100644 --- a/crates/bevy_mod_scripting_core/src/commands.rs +++ b/crates/bevy_mod_scripting_core/src/commands.rs @@ -445,7 +445,7 @@ mod test { .init_resource::() .insert_resource(CallbackSettings:: { callback_handler: |_, _, _, callback, c, _, _| { - c.push_str(format!(" callback-ran-{}", callback).as_str()); + c.push_str(format!(" callback-ran-{callback}").as_str()); Ok(ScriptValue::Unit) }, }) @@ -479,7 +479,7 @@ mod test { assert_eq!(id, script.id); let found_context = script.context.lock(); - assert_eq!(*context, *found_context, "{}", message); + assert_eq!(*context, *found_context, "{message}"); } fn assert_response_events( @@ -495,13 +495,12 @@ mod test { assert_eq!( responses.len(), expected.len(), - "Incorrect amount of events received {}", - context + "Incorrect amount of events received {context}" ); for (a, b) in responses.iter().zip(expected.iter()) { - assert_eq!(a.label, b.label, "{}", context); - assert_eq!(a.script, b.script, "{}", context); - assert_eq!(a.response, b.response, "{}", context); + assert_eq!(a.label, b.label, "{context}"); + assert_eq!(a.script, b.script, "{context}"); + assert_eq!(a.response, b.response, "{context}"); } } diff --git a/crates/bevy_mod_scripting_core/src/event.rs b/crates/bevy_mod_scripting_core/src/event.rs index 7d9c5c3da7..de9002ce85 100644 --- a/crates/bevy_mod_scripting_core/src/event.rs +++ b/crates/bevy_mod_scripting_core/src/event.rs @@ -301,7 +301,7 @@ mod test { '|', '\\', ':', ';', '"', '\'', '<', '>', ',', '.', '?', '/', '`', '~', ]; bad_chars.iter().for_each(|char| { - assert_eq!(super::CallbackLabel::new(&format!("bad{}", char)), None); + assert_eq!(super::CallbackLabel::new(&format!("bad{char}")), None); }); } @@ -313,7 +313,7 @@ mod test { ',', '.', '?', '/', '`', '~', ]; bad_chars.iter().for_each(|char| { - assert_eq!(super::CallbackLabel::new(&format!("{}bad", char)), None); + assert_eq!(super::CallbackLabel::new(&format!("{char}bad")), None); }); } diff --git a/crates/bevy_system_reflection/src/lib.rs b/crates/bevy_system_reflection/src/lib.rs index bf7cf158db..b176d96c2a 100644 --- a/crates/bevy_system_reflection/src/lib.rs +++ b/crates/bevy_system_reflection/src/lib.rs @@ -148,7 +148,7 @@ impl ReflectSystemSet { pub fn from_set(set: &dyn SystemSet, node_id: NodeId) -> Self { ReflectSystemSet { node_id: ReflectNodeId(node_id), - debug: format!("{:?}", set), + debug: format!("{set:?}"), type_id: set.system_type(), } } diff --git a/crates/lad_backends/mdbook_lad_preprocessor/src/lib.rs b/crates/lad_backends/mdbook_lad_preprocessor/src/lib.rs index 8edc0640e3..481087fab5 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/src/lib.rs +++ b/crates/lad_backends/mdbook_lad_preprocessor/src/lib.rs @@ -60,7 +60,7 @@ impl LADPreprocessor { .unwrap_or_default() .with_extension(""); - log::debug!("Parent path: {:?}", parent_path); + log::debug!("Parent path: {parent_path:?}"); let new_chapter = Section::new( parent_path, @@ -91,7 +91,7 @@ impl Preprocessor for LADPreprocessor { let mut errors = Vec::new(); let options = Options::from(context); - log::debug!("Options: {:?}", options); + log::debug!("Options: {options:?}"); OPTIONS .set(options) .map_err(|_| mdbook::errors::Error::msg("could not initialize options"))?; @@ -169,7 +169,7 @@ impl Preprocessor for LADPreprocessor { if !errors.is_empty() { // return on first error for error in errors { - log::error!("{}", error); + log::error!("{error}"); Err(error)?; } } diff --git a/crates/lad_backends/mdbook_lad_preprocessor/src/markdown.rs b/crates/lad_backends/mdbook_lad_preprocessor/src/markdown.rs index 4b69ee1afc..c577cdacbc 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/src/markdown.rs +++ b/crates/lad_backends/mdbook_lad_preprocessor/src/markdown.rs @@ -34,7 +34,7 @@ pub(crate) fn markdown_substring(markdown: &str, length: usize) -> String { let trimmed = markdown[..end].to_string(); // append ... - format!("{}...", trimmed) + format!("{trimmed}...") } /// Escapes Markdown reserved characters in the given text. @@ -208,7 +208,7 @@ impl IntoMarkdown for Markdown { Markdown::CodeBlock { language, code } => { // Do not escape code blocks let lang = language.as_deref().unwrap_or(""); - builder.append(&format!("```{}\n{}\n```", lang, code)); + builder.append(&format!("```{lang}\n{code}\n```")); } Markdown::List { ordered, items } => { items.iter().enumerate().for_each(|(i, item)| { @@ -233,7 +233,7 @@ impl IntoMarkdown for Markdown { Markdown::Quote(text) => { let quote_output = text .lines() - .map(|line| format!("> {}", line)) + .map(|line| format!("> {line}")) .collect::>() .join("\n"); builder.append("e_output); @@ -783,8 +783,7 @@ mod tests { assert_eq!( expected, markdown_substring(input, len), - "Failed for input: {}", - input + "Failed for input: {input}" ); } } diff --git a/crates/lad_backends/mdbook_lad_preprocessor/src/sections.rs b/crates/lad_backends/mdbook_lad_preprocessor/src/sections.rs index e932b3d261..e7f2aeb9cf 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/src/sections.rs +++ b/crates/lad_backends/mdbook_lad_preprocessor/src/sections.rs @@ -702,7 +702,7 @@ fn build_lad_function_argument_row( .name .as_ref() .cloned() - .unwrap_or_else(|| Cow::Owned(format!("arg{}", idx))); + .unwrap_or_else(|| Cow::Owned(format!("arg{idx}"))); builder.row(markdown_vec![ Markdown::new_paragraph(arg_name).bold(), diff --git a/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs b/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs index c643821cb3..c7f2406731 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs +++ b/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs @@ -83,8 +83,7 @@ fn test_on_example_ladfile() { let book_file = book_dir.join(relative_path); assert!( book_files.contains(&book_file), - "File not found: {:?}", - book_file + "File not found: {book_file:?}" ); let expected_content = std::fs::read_to_string(&expected_file).expect("failed to read file"); diff --git a/crates/ladfile_builder/src/lib.rs b/crates/ladfile_builder/src/lib.rs index 9fa1150d6b..3c6e6de46d 100644 --- a/crates/ladfile_builder/src/lib.rs +++ b/crates/ladfile_builder/src/lib.rs @@ -1107,7 +1107,7 @@ mod test { .join("ladfile") .join("test_assets"); - println!("Blessing test file at {:?}", path_to_test_assets); + println!("Blessing test file at {path_to_test_assets:?}"); std::fs::write(path_to_test_assets.join("test.lad.json"), &serialized).unwrap(); panic!("Blessed test file, please rerun the test"); } diff --git a/crates/languages/bevy_mod_scripting_lua/src/bindings/script_value.rs b/crates/languages/bevy_mod_scripting_lua/src/bindings/script_value.rs index bd296ef8a7..238e56cd92 100644 --- a/crates/languages/bevy_mod_scripting_lua/src/bindings/script_value.rs +++ b/crates/languages/bevy_mod_scripting_lua/src/bindings/script_value.rs @@ -54,7 +54,7 @@ impl FromLua for LuaScriptValue { Value::String(s) => ScriptValue::String(s.to_str()?.to_owned().into()), Value::Function(f) => ScriptValue::Function( (move |_context: FunctionCallContext, args: VecDeque| { - println!("Lua function called with args: {:?}", args); + println!("Lua function called with args: {args:?}"); match f.call::( args.into_iter() .map(LuaScriptValue) diff --git a/crates/languages/bevy_mod_scripting_rhai/src/lib.rs b/crates/languages/bevy_mod_scripting_rhai/src/lib.rs index a1a477cf5e..6f72de7362 100644 --- a/crates/languages/bevy_mod_scripting_rhai/src/lib.rs +++ b/crates/languages/bevy_mod_scripting_rhai/src/lib.rs @@ -123,7 +123,7 @@ impl Default for RhaiScriptingPlugin { for (key, function) in script_function_registry.iter_all() { let name = key.name.clone(); if ReservedKeyword::is_reserved_keyword(&name) { - let new_name = format!("{}_", name); + let new_name = format!("{name}_"); let mut new_function = function.clone(); let new_info = function.info.deref().clone().with_name(new_name.clone()); diff --git a/crates/testing_crates/script_integration_test_harness/src/lib.rs b/crates/testing_crates/script_integration_test_harness/src/lib.rs index fa039361e7..17956e9c62 100644 --- a/crates/testing_crates/script_integration_test_harness/src/lib.rs +++ b/crates/testing_crates/script_integration_test_harness/src/lib.rs @@ -143,16 +143,16 @@ pub fn make_test_rhai_plugin() -> bevy_mod_scripting_rhai::RhaiScriptingPlugin { runtime.set_max_call_levels(1000); runtime.register_fn("assert", |a: Dynamic, b: &str| { if !a.is::() { - panic!("Expected a boolean value, but got {:?}", a); + panic!("Expected a boolean value, but got {a:?}"); } if !a.as_bool().unwrap() { - panic!("Assertion failed. {}", b); + panic!("Assertion failed. {b}"); } }); runtime.register_fn("assert", |a: Dynamic| { if !a.is::() { - panic!("Expected a boolean value, but got {:?}", a); + panic!("Expected a boolean value, but got {a:?}"); } if !a.as_bool().unwrap() { panic!("Assertion failed"); diff --git a/crates/testing_crates/test_utils/src/lib.rs b/crates/testing_crates/test_utils/src/lib.rs index b371f235bb..4bfee6a338 100644 --- a/crates/testing_crates/test_utils/src/lib.rs +++ b/crates/testing_crates/test_utils/src/lib.rs @@ -40,7 +40,7 @@ fn visit_dirs(dir: &Path, cb: &mut dyn FnMut(&DirEntry)) -> io::Result<()> { } } } else { - panic!("Not a directory: {:?}", dir); + panic!("Not a directory: {dir:?}"); } Ok(()) } diff --git a/crates/xtask/src/main.rs b/crates/xtask/src/main.rs index 721b786d89..1b664a20ab 100644 --- a/crates/xtask/src/main.rs +++ b/crates/xtask/src/main.rs @@ -225,7 +225,7 @@ impl std::fmt::Display for Features { if i > 0 { write!(f, ",")?; } - write!(f, "{}", feature)?; + write!(f, "{feature}")?; } std::result::Result::Ok(()) } @@ -242,7 +242,7 @@ impl From for Features { .split(',') .map(|f| { Feature::from_str(f).unwrap_or_else(|_| { - eprintln!("Unknown feature: '{}'", f); + eprintln!("Unknown feature: '{f}'"); std::process::exit(1); }) }) @@ -856,7 +856,7 @@ impl Xtasks { add_args: I, dir: Option<&Path>, ) -> Result<()> { - info!("Running system command: {}", command); + info!("Running system command: {command}"); let working_dir = match dir { Some(d) => Self::relative_workspace_dir(app_settings, d)?, @@ -869,10 +869,10 @@ impl Xtasks { .stderr(std::process::Stdio::inherit()) .current_dir(working_dir); - info!("Using command: {:?}", cmd); + info!("Using command: {cmd:?}"); let output = cmd.output(); - info!("Command output: {:?}", output); + info!("Command output: {output:?}"); let output = output.with_context(|| context.to_owned())?; match output.status.code() { Some(0) => Ok(()), @@ -892,17 +892,18 @@ impl Xtasks { dir: Option<&Path>, capture_streams_in_output: bool, ) -> Result { - let coverage_mode = app_settings - .coverage - .then_some("with coverage") - .unwrap_or_default(); + let coverage_mode = if app_settings.coverage { + "with coverage" + } else { + Default::default() + }; info!("Running workspace command {coverage_mode}: {command}"); let mut args = vec![]; if let Some(ref toolchain) = app_settings.override_toolchain { - args.push(format!("+{}", toolchain)); + args.push(format!("+{toolchain}")); } args.push(command.to_owned()); @@ -956,7 +957,7 @@ impl Xtasks { .stderr(std::process::Stdio::inherit()); } - info!("Using command: {:?}", cmd); + info!("Using command: {cmd:?}"); let output = cmd.output().with_context(|| context.to_owned())?; match output.status.code() { @@ -1083,7 +1084,7 @@ impl Xtasks { Self::relative_workspace_dir(&main_workspace_app_settings, "target/codegen/bevy")?; let bevy_target_dir = bevy_dir.join("target"); // clear the bevy target dir if it exists - info!("Clearing bevy target dir: {:?}", bevy_target_dir); + info!("Clearing bevy target dir: {bevy_target_dir:?}"); if bevy_target_dir.exists() { std::fs::remove_dir_all(&bevy_target_dir)?; } @@ -1128,7 +1129,7 @@ impl Xtasks { "clone", "https://github.com/bevyengine/bevy", "--branch", - format!("v{}", bevy_version).as_str(), + format!("v{bevy_version}").as_str(), "--depth", "1", ".", @@ -1150,7 +1151,7 @@ impl Xtasks { &bevy_repo_app_settings, "git", "Failed to checkout bevy tag", - vec!["checkout", format!("v{}", bevy_version).as_str()], + vec!["checkout", format!("v{bevy_version}").as_str()], Some(&bevy_dir), )?; @@ -1266,7 +1267,7 @@ impl Xtasks { .get("features") .expect("no 'features' in docs.rs metadata"); - info!("Using docs.rs metadata: {:?}", docs_rs); + info!("Using docs.rs metadata: {docs_rs:?}"); let string_list = features .as_array() .expect("docs.rs metadata is not an array") @@ -1376,7 +1377,11 @@ impl Xtasks { let testbed = format!( "{os}{}", - github_token.is_some().then_some("-gha").unwrap_or_default() + if github_token.is_some() { + "-gha" + } else { + Default::default() + } ); // also figure out if we're on a fork @@ -1419,7 +1424,7 @@ impl Xtasks { .arg("--file") .arg(bench_file_path); - log::info!("Running bencher command: {:?}", bencher_cmd); + log::info!("Running bencher command: {bencher_cmd:?}"); let out = bencher_cmd .output() @@ -1502,7 +1507,7 @@ impl Xtasks { .with_context(|| "reading plots")? .into_iter() .map(|p| { - log::info!("Plot to delete: {:?}", p); + log::info!("Plot to delete: {p:?}"); let uuid = p.get("uuid").expect("no uuid in plot"); uuid.clone() }) @@ -1696,7 +1701,7 @@ impl Xtasks { // start with longest to compile all first powersets.reverse(); - info!("Powerset: {:?}", powersets); + info!("Powerset: {powersets:?}"); let default_args = app_settings .clone() @@ -1731,7 +1736,7 @@ impl Xtasks { }) } - log::info!("Powerset command combinations: {:?}", output); + log::info!("Powerset command combinations: {output:?}"); // next run a full lint check with all features output.push(App { @@ -1896,8 +1901,7 @@ impl Xtasks { // if the file already exists, merge the settings otherwise create it info!( - "Merging vscode settings at {:?}. With overrides generated by template.", - vscode_settings_path + "Merging vscode settings at {vscode_settings_path:?}. With overrides generated by template." ); if vscode_settings_path.exists() { let existing_settings = std::fs::read_to_string(&vscode_settings_path)?; @@ -1930,7 +1934,7 @@ impl Xtasks { { for (key, value) in overrides { // simply replace - info!("Replacing json key: {} with value: {}", key, value); + info!("Replacing json key: {key} with value: {value}"); target.insert(key.clone(), value.clone()); } } else { @@ -1988,7 +1992,7 @@ fn pop_cargo_env() -> Result<()> { for (key, value) in env.iter() { if key.starts_with("CARGO_") && !exclude_list.contains(&(key.as_str())) { - let new_key = format!("MAIN_{}", key); + let new_key = format!("MAIN_{key}"); std::env::set_var(new_key, value); std::env::remove_var(key); } @@ -2012,6 +2016,11 @@ fn try_main() -> Result<()> { .init(); pop_cargo_env()?; let args = App::try_parse()?; + info!( + "Default toolchain: {:?}", + args.global_args.override_toolchain + ); + let out = args.subcmd.run(args.global_args)?; // push any output to stdout if !out.is_empty() { @@ -2023,7 +2032,7 @@ fn try_main() -> Result<()> { fn main() { if let Err(e) = try_main() { - eprintln!("{:?}", e); + eprintln!("{e:?}"); std::process::exit(1); } } diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000000..e88baf106b --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.88.0"