diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 3c307fb1888..dbb18c308fe 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -35,7 +35,7 @@ jobs: # ref: ${{ github.event.pull_request.head.sha }} - uses: actions-rs/toolchain@v1 with: - toolchain: 1.66.0 + toolchain: 1.67.0 profile: minimal - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/moon.yml b/.github/workflows/moon.yml index 5aa596fcad5..551f13d7b9d 100644 --- a/.github/workflows/moon.yml +++ b/.github/workflows/moon.yml @@ -33,7 +33,7 @@ jobs: cache: yarn - uses: actions-rs/toolchain@v1 with: - toolchain: 1.66.0 + toolchain: 1.67.0 profile: minimal - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a052a1d0f99..ed20193f6bb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -25,7 +25,7 @@ jobs: - uses: actions-rs/toolchain@v1 name: Setup toolchain with: - toolchain: 1.66.0 + toolchain: 1.67.0 profile: minimal components: rustfmt - uses: Swatinem/rust-cache@v2 @@ -48,7 +48,7 @@ jobs: - uses: actions-rs/toolchain@v1 name: Setup toolchain with: - toolchain: 1.66.0 + toolchain: 1.67.0 profile: minimal components: clippy - uses: Swatinem/rust-cache@v2 @@ -69,7 +69,7 @@ jobs: - uses: actions-rs/toolchain@v1 name: Setup toolchain with: - toolchain: 1.66.0 + toolchain: 1.67.0 profile: minimal components: llvm-tools-preview - name: Cache cargo diff --git a/crates/cli/src/commands/ci.rs b/crates/cli/src/commands/ci.rs index c64a046f9c4..841d197f2f8 100644 --- a/crates/cli/src/commands/ci.rs +++ b/crates/cli/src/commands/ci.rs @@ -123,9 +123,9 @@ fn distribute_targets_across_jobs( let batched_targets; print_header(provider, "Distributing targets across jobs"); - println!("Job index: {}", job_index); - println!("Job total: {}", job_index); - println!("Batch size: {}", batch_size); + println!("Job index: {job_index}"); + println!("Job total: {job_index}"); + println!("Batch size: {batch_size}"); println!("Batched targets:"); if job_index == 0 { diff --git a/crates/cli/src/commands/clean.rs b/crates/cli/src/commands/clean.rs index bad0a549c59..dddfeca8d77 100644 --- a/crates/cli/src/commands/clean.rs +++ b/crates/cli/src/commands/clean.rs @@ -17,10 +17,7 @@ pub async fn clean(options: CleanOptions) -> Result<(), AnyError> { workspace.cache.clean_stale_cache(&options.cache_lifetime)?; done( - format!( - "Deleted {} files and saved {} bytes", - files_deleted, bytes_saved - ), + format!("Deleted {files_deleted} files and saved {bytes_saved} bytes"), true, ); diff --git a/crates/cli/src/commands/generate.rs b/crates/cli/src/commands/generate.rs index 08cc0458619..e8959de0a9a 100644 --- a/crates/cli/src/commands/generate.rs +++ b/crates/cli/src/commands/generate.rs @@ -57,7 +57,7 @@ fn parse_var_args(vars: &[String]) -> FxHashMap { } else { name }; - let comment = color::muted_light(format!("(from --{})", name)); + let comment = color::muted_light(format!("(from --{name})")); log_var(name, &value, Some(&comment)); diff --git a/crates/cli/src/commands/graph/dep.rs b/crates/cli/src/commands/graph/dep.rs index 763990d86ff..c5396c85b3f 100644 --- a/crates/cli/src/commands/graph/dep.rs +++ b/crates/cli/src/commands/graph/dep.rs @@ -46,7 +46,7 @@ pub async fn dep_graph(target_id: Option, dot: bool, json: bool) -> Resu let url = format!("http://{}", server.server_addr()); let _ = open::that(&url); - println!("Started server on {}", url); + println!("Started server on {url}"); for req in server.incoming_requests() { respond_to_request(req, &mut tera, &graph_info, "Dependency graph".to_owned())?; diff --git a/crates/cli/src/commands/graph/project.rs b/crates/cli/src/commands/graph/project.rs index 1106e69a129..13bf33b97e0 100644 --- a/crates/cli/src/commands/graph/project.rs +++ b/crates/cli/src/commands/graph/project.rs @@ -38,7 +38,7 @@ pub async fn project_graph( let url = format!("http://{}", server.server_addr()); let _ = open::that(&url); - println!("Started server on {}", url); + println!("Started server on {url}"); for req in server.incoming_requests() { respond_to_request(req, &mut tera, &graph_info, "Project graph".to_owned())?; diff --git a/crates/cli/src/commands/graph/utils.rs b/crates/cli/src/commands/graph/utils.rs index ce8492d7d97..675ccf87a68 100644 --- a/crates/cli/src/commands/graph/utils.rs +++ b/crates/cli/src/commands/graph/utils.rs @@ -29,7 +29,7 @@ pub async fn setup_server() -> Result<(Server, Tera), AnyError> { Ok(h) => h, Err(..) => "127.0.0.1".to_string(), }; - let address = format!("{}:{}", host, port); + let address = format!("{host}:{port}"); let server = Server::http(address).unwrap(); let tera = Tera::default(); diff --git a/crates/cli/src/commands/migrate/from_turborepo.rs b/crates/cli/src/commands/migrate/from_turborepo.rs index 99a9102c956..6b4eda55ab8 100644 --- a/crates/cli/src/commands/migrate/from_turborepo.rs +++ b/crates/cli/src/commands/migrate/from_turborepo.rs @@ -52,7 +52,7 @@ pub fn convert_globals(turbo: &TurboJson, tasks_config: &mut InheritedTasksConfi if let Some(global_env) = &turbo.global_env { for env in global_env { - tasks_config.implicit_inputs.push(format!("${}", env)); + tasks_config.implicit_inputs.push(format!("${env}")); } modified = true; @@ -66,8 +66,7 @@ pub fn convert_task(name: String, task: TurboTask) -> TaskConfig { let mut inputs = vec![]; config.command = Some(TaskCommandArgs::String(format!( - "moon node run-script {}", - name + "moon node run-script {name}" ))); if let Some(turbo_deps) = task.depends_on { @@ -92,7 +91,7 @@ pub fn convert_task(name: String, task: TurboTask) -> TaskConfig { if let Some(turbo_env) = task.env { for env in turbo_env { - inputs.push(format!("${}", env)); + inputs.push(format!("${env}")); } } @@ -105,7 +104,7 @@ pub fn convert_task(name: String, task: TurboTask) -> TaskConfig { for output in turbo_outputs { if output.ends_with("/**") { - outputs.push(format!("{}/*", output)); + outputs.push(format!("{output}/*")); } else { outputs.push(output); } diff --git a/crates/cli/src/commands/run.rs b/crates/cli/src/commands/run.rs index acdea817130..46545ff1278 100644 --- a/crates/cli/src/commands/run.rs +++ b/crates/cli/src/commands/run.rs @@ -83,11 +83,10 @@ pub async fn run_target( }; println!( - "Target(s) {} not affected by touched files (using status {})", - targets_list, status_list + "Target(s) {targets_list} not affected by touched files (using status {status_list})" ); } else { - println!("No tasks found for target(s) {}", targets_list); + println!("No tasks found for target(s) {targets_list}"); } return Ok(()); diff --git a/crates/cli/src/commands/sync.rs b/crates/cli/src/commands/sync.rs index b6ab10f6473..4b6f5d352d9 100644 --- a/crates/cli/src/commands/sync.rs +++ b/crates/cli/src/commands/sync.rs @@ -21,7 +21,7 @@ pub async fn sync() -> Result<(), AnyError> { let results = pipeline.run(dep_graph, None).await?; done( - format!("Successfully synced {} projects", project_count), + format!("Successfully synced {project_count} projects"), true, ); diff --git a/crates/cli/src/queries/projects.rs b/crates/cli/src/queries/projects.rs index 05a06e58bc8..8f57f751bad 100644 --- a/crates/cli/src/queries/projects.rs +++ b/crates/cli/src/queries/projects.rs @@ -56,7 +56,7 @@ fn convert_to_regex(field: &str, value: &Option) -> Result Ok(None), } diff --git a/crates/cli/tests/run_node_test.rs b/crates/cli/tests/run_node_test.rs index b152adceed5..22ed18814b6 100644 --- a/crates/cli/tests/run_node_test.rs +++ b/crates/cli/tests/run_node_test.rs @@ -47,7 +47,7 @@ fn depman_sandbox(depman: &str) -> Sandbox { get_node_depman_fixture_configs(depman); let sandbox = create_sandbox_with_config( - format!("node-{}/workspaces", depman), + format!("node-{depman}/workspaces"), Some(&workspace_config), Some(&toolchain_config), Some(&tasks_config), @@ -65,7 +65,7 @@ fn depman_non_workspaces_sandbox(depman: &str) -> Sandbox { WorkspaceProjects::Sources(FxHashMap::from_iter([("root".to_owned(), ".".to_owned())])); let sandbox = create_sandbox_with_config( - format!("node-{}/project", depman), + format!("node-{depman}/project"), Some(&workspace_config), Some(&toolchain_config), Some(&tasks_config), @@ -575,7 +575,7 @@ mod sync_depends_on { // deps-c does not have a `package.json` on purpose assert_snapshot!( - format!("format_{:?}", format), + format!("format_{format:?}"), read_to_string(sandbox.path().join("depends-on/package.json")).unwrap() ); } diff --git a/crates/cli/tests/run_test.rs b/crates/cli/tests/run_test.rs index 5214228eec9..6ebbf7e9a14 100644 --- a/crates/cli/tests/run_test.rs +++ b/crates/cli/tests/run_test.rs @@ -499,14 +499,14 @@ mod outputs { assert!(sandbox .path() .join(".moon/cache/hashes") - .join(format!("{}.json", hash)) + .join(format!("{hash}.json")) .exists()); // outputs assert!(sandbox .path() .join(".moon/cache/outputs") - .join(format!("{}.tar.gz", hash)) + .join(format!("{hash}.tar.gz")) .exists()); } @@ -525,14 +525,14 @@ mod outputs { assert!(sandbox .path() .join(".moon/cache/hashes") - .join(format!("{}.json", hash)) + .join(format!("{hash}.json")) .exists()); // outputs assert!(sandbox .path() .join(".moon/cache/outputs") - .join(format!("{}.tar.gz", hash)) + .join(format!("{hash}.tar.gz")) .exists()); } @@ -551,14 +551,14 @@ mod outputs { assert!(sandbox .path() .join(".moon/cache/hashes") - .join(format!("{}.json", hash)) + .join(format!("{hash}.json")) .exists()); // outputs assert!(sandbox .path() .join(".moon/cache/outputs") - .join(format!("{}.tar.gz", hash)) + .join(format!("{hash}.tar.gz")) .exists()); } @@ -577,14 +577,14 @@ mod outputs { assert!(sandbox .path() .join(".moon/cache/hashes") - .join(format!("{}.json", hash)) + .join(format!("{hash}.json")) .exists()); // outputs assert!(sandbox .path() .join(".moon/cache/outputs") - .join(format!("{}.tar.gz", hash)) + .join(format!("{hash}.tar.gz")) .exists()); } @@ -603,14 +603,14 @@ mod outputs { assert!(sandbox .path() .join(".moon/cache/hashes") - .join(format!("{}.json", hash)) + .join(format!("{hash}.json")) .exists()); // outputs assert!(sandbox .path() .join(".moon/cache/outputs") - .join(format!("{}.tar.gz", hash)) + .join(format!("{hash}.tar.gz")) .exists()); } @@ -627,7 +627,7 @@ mod outputs { let tarball = sandbox .path() .join(".moon/cache/outputs") - .join(format!("{}.tar.gz", hash)); + .join(format!("{hash}.tar.gz")); let dir = sandbox.path().join(".moon/cache/outputs").join(hash); moon_archive::untar(tarball, &dir, None).unwrap(); @@ -651,7 +651,7 @@ mod outputs { let tarball = sandbox .path() .join(".moon/cache/outputs") - .join(format!("{}.tar.gz", hash)); + .join(format!("{hash}.tar.gz")); let dir = sandbox.path().join(".moon/cache/outputs").join(hash); moon_archive::untar(tarball, &dir, None).unwrap(); @@ -820,7 +820,7 @@ mod outputs { assert!(!sandbox .path() - .join(format!(".moon/cache/outputs/{}.tar.gz", hash)) + .join(format!(".moon/cache/outputs/{hash}.tar.gz")) .exists()); } @@ -842,7 +842,7 @@ mod outputs { assert!(sandbox .path() - .join(format!(".moon/cache/outputs/{}.tar.gz", hash)) + .join(format!(".moon/cache/outputs/{hash}.tar.gz")) .exists()); } @@ -862,7 +862,7 @@ mod outputs { assert!(sandbox .path() - .join(format!(".moon/cache/outputs/{}.tar.gz", hash)) + .join(format!(".moon/cache/outputs/{hash}.tar.gz")) .exists()); } @@ -882,7 +882,7 @@ mod outputs { assert!(!sandbox .path() - .join(format!(".moon/cache/outputs/{}.tar.gz", hash)) + .join(format!(".moon/cache/outputs/{hash}.tar.gz")) .exists()); } diff --git a/crates/cli/tests/run_webhooks_test.rs b/crates/cli/tests/run_webhooks_test.rs index 1cefa8c261c..9d630d1f853 100644 --- a/crates/cli/tests/run_webhooks_test.rs +++ b/crates/cli/tests/run_webhooks_test.rs @@ -6,7 +6,7 @@ fn sandbox(uri: String) -> Sandbox { let (mut workspace_config, toolchain_config, tasks_config) = get_node_fixture_configs(); workspace_config.notifier = NotifierConfig { - webhook_url: Some(format!("{}/webhook", uri)), + webhook_url: Some(format!("{uri}/webhook")), }; let sandbox = create_sandbox_with_config( diff --git a/crates/core/action-pipeline/src/pipeline.rs b/crates/core/action-pipeline/src/pipeline.rs index 1c9bd3d1e7b..97777eaf19f 100644 --- a/crates/core/action-pipeline/src/pipeline.rs +++ b/crates/core/action-pipeline/src/pipeline.rs @@ -109,7 +109,7 @@ impl Pipeline { for (b, batch) in batches.into_iter().enumerate() { let batch_index = b + 1; - let batch_target_name = format!("{}:batch:{}", LOG_TARGET, batch_index); + let batch_target_name = format!("{LOG_TARGET}:batch:{batch_index}"); let actions_count = batch.len(); let mut action_handles = vec![]; @@ -131,7 +131,7 @@ impl Pipeline { let runtime = tokio::runtime::Handle::current(); let mut action = Action::new(node.to_owned()); - action.log_target = format!("{}:{}", batch_target_name, action_index); + action.log_target = format!("{batch_target_name}:{action_index}"); action_handles.push(pool.complete(async move { runtime @@ -310,20 +310,19 @@ impl Pipeline { if pass_count > 0 { if cached_count > 0 { counts_message.push(color::success(format!( - "{} completed ({} cached)", - pass_count, cached_count + "{pass_count} completed ({cached_count} cached)" ))); } else { - counts_message.push(color::success(format!("{} completed", pass_count))); + counts_message.push(color::success(format!("{pass_count} completed"))); } } if fail_count > 0 { - counts_message.push(color::failure(format!("{} failed", fail_count))); + counts_message.push(color::failure(format!("{fail_count} failed"))); } if invalid_count > 0 { - counts_message.push(color::invalid(format!("{} invalid", invalid_count))); + counts_message.push(color::invalid(format!("{invalid_count} invalid"))); } let term = Term::buffered_stdout(); diff --git a/crates/core/action/src/node.rs b/crates/core/action/src/node.rs index 97bcd867d11..7ce1e052bae 100644 --- a/crates/core/action/src/node.rs +++ b/crates/core/action/src/node.rs @@ -25,21 +25,21 @@ impl ActionNode { pub fn label(&self) -> String { match self { ActionNode::InstallDeps(platform) => match platform { - Runtime::Node(version) => format!("Install{}Deps({})", platform, version), - _ => format!("Install{}Deps", platform), + Runtime::Node(version) => format!("Install{platform}Deps({version})"), + _ => format!("Install{platform}Deps"), }, ActionNode::InstallProjectDeps(platform, id) => match platform { Runtime::Node(version) => { - format!("Install{}DepsInProject({}, {})", platform, version, id) + format!("Install{platform}DepsInProject({version}, {id})") } - _ => format!("Install{}DepsInProject({})", platform, id), + _ => format!("Install{platform}DepsInProject({id})"), }, - ActionNode::RunTarget(_, id) => format!("RunTarget({})", id), + ActionNode::RunTarget(_, id) => format!("RunTarget({id})"), ActionNode::SetupTool(platform) => match platform { - Runtime::Node(version) => format!("Setup{}Tool({})", platform, version), - _ => format!("Setup{}Tool", platform), + Runtime::Node(version) => format!("Setup{platform}Tool({version})"), + _ => format!("Setup{platform}Tool"), }, - ActionNode::SyncProject(platform, id) => format!("Sync{}Project({})", platform, id), + ActionNode::SyncProject(platform, id) => format!("Sync{platform}Project({id})"), } } } diff --git a/crates/core/archive/benches/tar_benchmark.rs b/crates/core/archive/benches/tar_benchmark.rs index 9f02fee5d72..fcb678a99e7 100644 --- a/crates/core/archive/benches/tar_benchmark.rs +++ b/crates/core/archive/benches/tar_benchmark.rs @@ -23,7 +23,7 @@ fn create_tree() -> (TempDir, PathBuf, PathBuf, Vec) { fs::create_dir_all(&parent).unwrap(); } - fs::write(parent.join(format!("{}.txt", i)), Faker.fake::()).unwrap(); + fs::write(parent.join(format!("{i}.txt")), Faker.fake::()).unwrap(); if i % 100 == 0 { dir_index += 1; diff --git a/crates/core/cache/src/engine.rs b/crates/core/cache/src/engine.rs index 3f8f3719d0b..6ff1872d53d 100644 --- a/crates/core/cache/src/engine.rs +++ b/crates/core/cache/src/engine.rs @@ -65,10 +65,10 @@ impl CacheEngine { runtime: &Runtime, project_id: Option<&str>, ) -> Result { - let name = format!("deps{}.json", runtime); + let name = format!("deps{runtime}.json"); DependenciesState::load(self.get_state_path(if let Some(id) = project_id { - format!("{}/{}", id, name) + format!("{id}/{name}") } else { name })) @@ -101,7 +101,7 @@ impl CacheEngine { lifetime: &str, ) -> Result { let duration = time::parse_duration(lifetime) - .map_err(|e| MoonError::Generic(format!("Invalid lifetime: {}", e)))?; + .map_err(|e| MoonError::Generic(format!("Invalid lifetime: {e}")))?; trace!( target: LOG_TARGET, @@ -164,11 +164,11 @@ impl CacheEngine { } pub fn get_hash_archive_path(&self, hash: &str) -> PathBuf { - self.outputs_dir.join(format!("{}.tar.gz", hash)) + self.outputs_dir.join(format!("{hash}.tar.gz")) } pub fn get_hash_manifest_path(&self, hash: &str) -> PathBuf { - self.hashes_dir.join(format!("{}.json", hash)) + self.hashes_dir.join(format!("{hash}.json")) } pub fn get_mode(&self) -> CacheMode { diff --git a/crates/core/config/src/project/config.rs b/crates/core/config/src/project/config.rs index 688ac8fc268..0becd043381 100644 --- a/crates/core/config/src/project/config.rs +++ b/crates/core/config/src/project/config.rs @@ -24,7 +24,7 @@ use validator::{Validate, ValidationError}; fn validate_file_groups(map: &FileGroups) -> Result<(), ValidationError> { for key in map.keys() { - validate_id(format!("fileGroups.{}", key), key)?; + validate_id(format!("fileGroups.{key}"), key)?; } Ok(()) @@ -32,13 +32,13 @@ fn validate_file_groups(map: &FileGroups) -> Result<(), ValidationError> { fn validate_tasks(map: &BTreeMap) -> Result<(), ValidationError> { for (name, task) in map { - validate_id(format!("tasks.{}", name), name)?; + validate_id(format!("tasks.{name}"), name)?; // Only fail for empty strings and not `None` if task.command.is_some() && task.get_command().is_empty() { return Err(create_validation_error( "required_command", - format!("tasks.{}.command", name), + format!("tasks.{name}.command"), "An npm/system command is required", )); } diff --git a/crates/core/config/src/project/task.rs b/crates/core/config/src/project/task.rs index b162d0ec75d..9a879acea45 100644 --- a/crates/core/config/src/project/task.rs +++ b/crates/core/config/src/project/task.rs @@ -15,7 +15,7 @@ use validator::{Validate, ValidationError}; fn validate_deps(list: &[String]) -> Result<(), ValidationError> { for (index, item) in list.iter().enumerate() { - let key = format!("deps[{}]", index); + let key = format!("deps[{index}]"); // When no target scope, it's assumed to be a self scope if item.contains(':') { @@ -31,7 +31,7 @@ fn validate_deps(list: &[String]) -> Result<(), ValidationError> { fn validate_inputs(list: &[String]) -> Result<(), ValidationError> { for (index, item) in list.iter().enumerate() { if !ENV_VAR.is_match(item) { - validate_child_or_root_path(format!("inputs[{}]", index), item)?; + validate_child_or_root_path(format!("inputs[{index}]"), item)?; } } @@ -40,7 +40,7 @@ fn validate_inputs(list: &[String]) -> Result<(), ValidationError> { fn validate_outputs(list: &[String]) -> Result<(), ValidationError> { for (index, item) in list.iter().enumerate() { - validate_child_or_root_path(format!("outputs[{}]", index), item)?; + validate_child_or_root_path(format!("outputs[{index}]"), item)?; } Ok(()) diff --git a/crates/core/config/src/tasks/config.rs b/crates/core/config/src/tasks/config.rs index d785149ad58..018e4258446 100644 --- a/crates/core/config/src/tasks/config.rs +++ b/crates/core/config/src/tasks/config.rs @@ -19,7 +19,7 @@ use validator::{Validate, ValidationError}; fn validate_deps(list: &[String]) -> Result<(), ValidationError> { for (index, item) in list.iter().enumerate() { - let key = format!("implicitDeps[{}]", index); + let key = format!("implicitDeps[{index}]"); // When no target scope, it's assumed to be a self scope if item.contains(':') { @@ -34,7 +34,7 @@ fn validate_deps(list: &[String]) -> Result<(), ValidationError> { fn validate_file_groups(map: &FileGroups) -> Result<(), ValidationError> { for key in map.keys() { - validate_id(format!("fileGroups.{}", key), key)?; + validate_id(format!("fileGroups.{key}"), key)?; } Ok(()) @@ -42,13 +42,13 @@ fn validate_file_groups(map: &FileGroups) -> Result<(), ValidationError> { fn validate_tasks(map: &BTreeMap) -> Result<(), ValidationError> { for (name, task) in map { - validate_id(format!("tasks.{}", name), name)?; + validate_id(format!("tasks.{name}"), name)?; // Fail for both `None` and empty strings if task.get_command().is_empty() { return Err(create_validation_error( "required_command", - format!("tasks.{}.command", name), + format!("tasks.{name}.command"), "An npm/system command is required", )); } diff --git a/crates/core/config/src/tasks/manager.rs b/crates/core/config/src/tasks/manager.rs index 602b8ffe232..487ca0bd15d 100644 --- a/crates/core/config/src/tasks/manager.rs +++ b/crates/core/config/src/tasks/manager.rs @@ -34,16 +34,16 @@ impl InheritedTasksManager { let is_js_platform = matches!(platform, PlatformType::Node); if is_js_platform { - lookup.push(format!("{}", platform)); + lookup.push(format!("{platform}")); } - lookup.push(format!("{}", language)); + lookup.push(format!("{language}")); if is_js_platform { - lookup.push(format!("{}-{}", platform, type_of)); + lookup.push(format!("{platform}-{type_of}")); } - lookup.push(format!("{}-{}", language, type_of)); + lookup.push(format!("{language}-{type_of}")); lookup } @@ -68,7 +68,7 @@ impl InheritedTasksManager { } // Automatically set this lookup as an input - let input = format!("/.moon/tasks/{}.yml", lookup); + let input = format!("/.moon/tasks/{lookup}.yml"); if let Some(inputs) = &mut task.inputs { inputs.push(input); diff --git a/crates/core/config/src/workspace/config.rs b/crates/core/config/src/workspace/config.rs index 0da8fa8878d..4f569f3bda2 100644 --- a/crates/core/config/src/workspace/config.rs +++ b/crates/core/config/src/workspace/config.rs @@ -37,7 +37,7 @@ fn validate_projects(projects: &WorkspaceProjects) -> Result<(), ValidationError if let Some(map) = map { for (key, value) in map { - validate_id(format!("projects.{}", key), key)?; + validate_id(format!("projects.{key}"), key)?; match validate_child_relative_path("projects", value) { Ok(_) => {} diff --git a/crates/core/config/src/workspace/generator.rs b/crates/core/config/src/workspace/generator.rs index b03d47eb5cc..f1e4a497330 100644 --- a/crates/core/config/src/workspace/generator.rs +++ b/crates/core/config/src/workspace/generator.rs @@ -17,7 +17,7 @@ fn validate_templates(files: &[FilePath]) -> Result<(), ValidationError> { } for (index, file) in files.iter().enumerate() { - validate_child_relative_path(format!("templates[{}]", index), file)?; + validate_child_relative_path(format!("templates[{index}]"), file)?; } Ok(()) diff --git a/crates/core/config/src/workspace/runner.rs b/crates/core/config/src/workspace/runner.rs index 2fb9930fac1..0abe4116a46 100644 --- a/crates/core/config/src/workspace/runner.rs +++ b/crates/core/config/src/workspace/runner.rs @@ -12,7 +12,7 @@ fn validate_cache_lifetime(value: &str) -> Result<(), ValidationError> { return Err(create_validation_error( "invalid_duration", "cacheLifetime", - format!("Invalid lifetime duration: {}", e), + format!("Invalid lifetime duration: {e}"), )); } @@ -21,7 +21,7 @@ fn validate_cache_lifetime(value: &str) -> Result<(), ValidationError> { fn validate_archivable_targets(list: &[String]) -> Result<(), ValidationError> { for (index, item) in list.iter().enumerate() { - validate_target(format!("archivableTargets[{}]", index), item)?; + validate_target(format!("archivableTargets[{index}]"), item)?; } Ok(()) diff --git a/crates/core/config/tests/global_tasks_test.rs b/crates/core/config/tests/global_tasks_test.rs index c0003d92ed5..f75b228a0de 100644 --- a/crates/core/config/tests/global_tasks_test.rs +++ b/crates/core/config/tests/global_tasks_test.rs @@ -323,15 +323,14 @@ fileGroups: super::CONFIG_TASKS_FILENAME, format!( r#" -extends: '{}' +extends: '{url}' fileGroups: sources: - sources/**/* configs: - '*.js' -"#, - url +"# ) .as_ref(), )?; diff --git a/crates/core/config/tests/task_inheritance_test.rs b/crates/core/config/tests/task_inheritance_test.rs index 082e5ac995f..0dde5a4d78c 100644 --- a/crates/core/config/tests/task_inheritance_test.rs +++ b/crates/core/config/tests/task_inheritance_test.rs @@ -13,7 +13,7 @@ fn mock_task(command: &str, platform: PlatformType) -> TaskConfig { inputs: if command == "global" { None } else { - Some(string_vec![format!("/.moon/tasks/{}.yml", command)]) + Some(string_vec![format!("/.moon/tasks/{command}.yml")]) }, platform, ..TaskConfig::default() diff --git a/crates/core/config/tests/toolchain_test.rs b/crates/core/config/tests/toolchain_test.rs index e4cb01ff8bf..4a9e46de698 100644 --- a/crates/core/config/tests/toolchain_test.rs +++ b/crates/core/config/tests/toolchain_test.rs @@ -228,14 +228,13 @@ node: super::CONFIG_TOOLCHAIN_FILENAME, format!( r#" -extends: '{}' +extends: '{url}' node: version: '18.0.0' npm: version: '8.0.0' -"#, - url +"# ) .as_ref(), )?; diff --git a/crates/core/dep-graph/src/dep_graph.rs b/crates/core/dep-graph/src/dep_graph.rs index cdfd82de235..d1019ddc8bd 100644 --- a/crates/core/dep-graph/src/dep_graph.rs +++ b/crates/core/dep-graph/src/dep_graph.rs @@ -129,14 +129,11 @@ impl DepGraph { &|_, n| { let id = n.1; - format!( - "label=\"{}\" style=filled, shape=oval, fillcolor=gray, fontcolor=black", - id - ) + format!("label=\"{id}\" style=filled, shape=oval, fillcolor=gray, fontcolor=black") }, ); - format!("{:?}", dot) + format!("{dot:?}") } #[track_caller] diff --git a/crates/core/generator/src/template.rs b/crates/core/generator/src/template.rs index f509c6a4dd5..55052a4a447 100644 --- a/crates/core/generator/src/template.rs +++ b/crates/core/generator/src/template.rs @@ -257,7 +257,7 @@ impl Template { let var = var.as_str(); if context.contains_key(var) { - return format!("{{{{ {} | as_str }}}}", var); + return format!("{{{{ {var} | as_str }}}}"); } } diff --git a/crates/core/logger/src/logger.rs b/crates/core/logger/src/logger.rs index 1c92f3522fc..79ab0a6b02f 100644 --- a/crates/core/logger/src/logger.rs +++ b/crates/core/logger/src/logger.rs @@ -86,7 +86,7 @@ impl Logger { let formatted_message = format!("{} {} {}", prefix, record.target(), message); let message_without_colors = strip_ansi_codes(&formatted_message); - out.finish(format_args!("{}", message_without_colors)) + out.finish(format_args!("{message_without_colors}")) }) .chain(log_file(output).expect("Could not create log file.")); diff --git a/crates/core/moonbase/src/lib.rs b/crates/core/moonbase/src/lib.rs index d38e2de3d47..d9f43445843 100644 --- a/crates/core/moonbase/src/lib.rs +++ b/crates/core/moonbase/src/lib.rs @@ -95,7 +95,7 @@ impl Moonbase { &self, hash: &str, ) -> Result)>, MoonbaseError> { - let response = get_request(format!("artifacts/{}", hash), Some(&self.auth_token)).await?; + let response = get_request(format!("artifacts/{hash}"), Some(&self.auth_token)).await?; // dbg!("read_artifact", hash, &response); @@ -125,7 +125,7 @@ impl Moonbase { // dbg!("write_artifact", hash, &input); let response = - post_request(format!("artifacts/{}", hash), input, Some(&self.auth_token)).await?; + post_request(format!("artifacts/{hash}"), input, Some(&self.auth_token)).await?; // dbg!(&response); @@ -153,7 +153,7 @@ impl Moonbase { reqwest::Client::new().get(url) } else { reqwest::Client::new() - .get(endpoint(format!("artifacts/{}/download", hash))) + .get(endpoint(format!("artifacts/{hash}/download"))) .bearer_auth(&self.auth_token) .header("Accept", "application/json") }; @@ -210,7 +210,7 @@ pub async fn upload_artifact( .body(Body::wrap_stream(file_stream)) } else { reqwest::Client::new() - .post(endpoint(format!("artifacts/{}/upload", hash))) + .post(endpoint(format!("artifacts/{hash}/upload"))) .body(Body::wrap_stream(file_stream)) .bearer_auth(&auth_token) .header("Accept", "application/json") @@ -256,7 +256,7 @@ async fn mark_upload_complete( job_id: Option, ) -> Result<(), MoonbaseError> { let _: Response = post_request( - format!("artifacts/{}/complete", hash), + format!("artifacts/{hash}/complete"), ArtifactCompleteInput { job_id, success }, Some(auth_token), ) diff --git a/crates/core/platform-runtime/src/runtime.rs b/crates/core/platform-runtime/src/runtime.rs index 77d5c8c6cba..daa3d457daf 100644 --- a/crates/core/platform-runtime/src/runtime.rs +++ b/crates/core/platform-runtime/src/runtime.rs @@ -13,7 +13,7 @@ pub enum Runtime { impl Runtime { pub fn label(&self) -> String { match self { - Runtime::Node(version) => format!("Node.js v{}", version), + Runtime::Node(version) => format!("Node.js v{version}"), Runtime::System => "system".into(), } } diff --git a/crates/core/project-graph/src/project_graph.rs b/crates/core/project-graph/src/project_graph.rs index d8cc1620e8f..181ec82373d 100644 --- a/crates/core/project-graph/src/project_graph.rs +++ b/crates/core/project-graph/src/project_graph.rs @@ -173,14 +173,11 @@ impl ProjectGraph { // if id == &highlight_id { // // String::from("style=filled, shape=circle, fillcolor=palegreen, fontcolor=black") // } else { - format!( - "label=\"{}\" style=filled, shape=oval, fillcolor=gray, fontcolor=black", - id - ) + format!("label=\"{id}\" style=filled, shape=oval, fillcolor=gray, fontcolor=black") // } }, ); - format!("{:?}", dot) + format!("{dot:?}") } } diff --git a/crates/core/project-graph/src/token_resolver.rs b/crates/core/project-graph/src/token_resolver.rs index 61618700361..9066d4c9702 100644 --- a/crates/core/project-graph/src/token_resolver.rs +++ b/crates/core/project-graph/src/token_resolver.rs @@ -88,7 +88,7 @@ impl TokenType { if name.is_empty() { "$var".into() } else { - format!("${}", name) + format!("${name}") } } } diff --git a/crates/core/project-graph/tests/projects_test.rs b/crates/core/project-graph/tests/projects_test.rs index 7cd998ab129..62653128357 100644 --- a/crates/core/project-graph/tests/projects_test.rs +++ b/crates/core/project-graph/tests/projects_test.rs @@ -409,7 +409,7 @@ mod task_inheritance { let task = project_graph.get("rename").unwrap().get_task(id).unwrap(); assert_eq!(task.id, id.to_owned()); - assert_eq!(task.target.id, format!("rename:{}", id)); + assert_eq!(task.target.id, format!("rename:{id}")); } } diff --git a/crates/core/project/src/project.rs b/crates/core/project/src/project.rs index 38a66120951..118f31651dd 100644 --- a/crates/core/project/src/project.rs +++ b/crates/core/project/src/project.rs @@ -336,7 +336,7 @@ impl Project { where F: FnOnce(&Path) -> ProjectLanguage, { - let log_target = format!("moon:project:{}", id); + let log_target = format!("moon:project:{id}"); // For the root-level project, the "." dot actually causes // a ton of unwanted issues, so just use workspace root directly. diff --git a/crates/core/target/src/target.rs b/crates/core/target/src/target.rs index 2d01a77d7e5..a602f95af5e 100644 --- a/crates/core/target/src/target.rs +++ b/crates/core/target/src/target.rs @@ -70,7 +70,7 @@ impl Target { } pub fn format(project_id: &str, task_id: &str) -> Result { - Ok(format!("{}:{}", project_id, task_id)) + Ok(format!("{project_id}:{task_id}")) } pub fn parse(target_id: &str) -> Result { diff --git a/crates/core/terminal/src/helpers.rs b/crates/core/terminal/src/helpers.rs index ab0d2ea5650..0284e7f3970 100644 --- a/crates/core/terminal/src/helpers.rs +++ b/crates/core/terminal/src/helpers.rs @@ -53,7 +53,7 @@ mod test { let list = vec!["file_path", "muted", "id", "path", "shell", "symbol"]; for token in list { - let value = format!("Before <{}>inner after", token, token); + let value = format!("Before <{token}>inner after"); assert_ne!(replace_style_tokens(&value), value); } diff --git a/crates/core/terminal/src/terminal.rs b/crates/core/terminal/src/terminal.rs index 79e495f2d0a..58845733f10 100644 --- a/crates/core/terminal/src/terminal.rs +++ b/crates/core/terminal/src/terminal.rs @@ -35,7 +35,7 @@ pub trait ExtendedTerm { impl ExtendedTerm for Term { fn format(&self, value: &impl Debug) -> String { - format!("{:?}", value) + format!("{value:?}") } fn format_label>(&self, kind: Label, message: V) -> String { diff --git a/crates/core/test-utils/src/sandbox.rs b/crates/core/test-utils/src/sandbox.rs index 2eb2ffa8e4a..c6a14246c40 100644 --- a/crates/core/test-utils/src/sandbox.rs +++ b/crates/core/test-utils/src/sandbox.rs @@ -80,7 +80,7 @@ impl Sandbox { handler(&mut cmd); let out = cmd.output().unwrap_or_else(|e| { - panic!("{:#?}", e); + panic!("{e:#?}"); }); if !out.status.success() { diff --git a/crates/core/utils/src/process.rs b/crates/core/utils/src/process.rs index cfc4236f5ad..b15f6302725 100644 --- a/crates/core/utils/src/process.rs +++ b/crates/core/utils/src/process.rs @@ -54,7 +54,7 @@ pub fn format_running_command( ) }; - let suffix = format!("(in {})", target_dir); + let suffix = format!("(in {target_dir})"); let message = format!("{} {}", command_line, color::muted(suffix)); color::muted_light(message) @@ -248,7 +248,6 @@ impl Command { Ok(output) } - #[track_caller] pub async fn exec_stream_and_capture_output(&mut self) -> Result { self.log_command_info(); @@ -296,9 +295,9 @@ impl Command { while let Ok(Some(line)) = lines.next_line().await { if stderr_prefix.is_empty() { - eprintln!("{}", line); + eprintln!("{line}"); } else { - eprintln!("{} {}", stderr_prefix, line); + eprintln!("{stderr_prefix} {line}"); } captured_lines.push(line); @@ -316,9 +315,9 @@ impl Command { while let Ok(Some(line)) = lines.next_line().await { if stdout_prefix.is_empty() { - println!("{}", line); + println!("{line}"); } else { - println!("{} {}", stdout_prefix, line); + println!("{stdout_prefix} {line}"); } captured_lines.push(line); @@ -445,7 +444,7 @@ impl Command { pub fn set_prefix(&mut self, prefix: &str, width: Option) -> &mut Command { if is_ci() && !is_test_env() { - self.prefix = Some(color::muted(format!("[{}]", prefix))); + self.prefix = Some(color::muted(format!("[{prefix}]"))); } else { self.prefix = Some(format!( "{} {}", @@ -557,7 +556,7 @@ impl Command { let input = self.get_input_line(); let mut stdin = child.stdin.take().unwrap_or_else(|| { - panic!("Unable to write stdin: {}", input); + panic!("Unable to write stdin: {input}"); }); stdin.write_all(input.as_bytes()).await?; diff --git a/crates/core/utils/src/time.rs b/crates/core/utils/src/time.rs index 46ec9abb114..684153f7de5 100644 --- a/crates/core/utils/src/time.rs +++ b/crates/core/utils/src/time.rs @@ -50,31 +50,31 @@ pub fn elapsed(duration: Duration) -> String { let mut parts = vec![]; if years > 0 { - parts.push(format!("{}y", years)); + parts.push(format!("{years}y")); } if months > 0 { - parts.push(format!("{}mo", months)); + parts.push(format!("{months}mo")); } if days > 0 { - parts.push(format!("{}d", days)); + parts.push(format!("{days}d")); } if hours > 0 { - parts.push(format!("{}h", hours)); + parts.push(format!("{hours}h")); } if minutes > 0 { - parts.push(format!("{}m", minutes)); + parts.push(format!("{minutes}m")); } if seconds > 0 { - parts.push(format!("{}s", seconds)); + parts.push(format!("{seconds}s")); } if millis > 0 { - parts.push(format!("{}ms", millis)); + parts.push(format!("{millis}ms")); } if parts.is_empty() { diff --git a/crates/core/utils/tests/json_test.rs b/crates/core/utils/tests/json_test.rs index abb9384a35b..4672b7af2a6 100644 --- a/crates/core/utils/tests/json_test.rs +++ b/crates/core/utils/tests/json_test.rs @@ -68,7 +68,7 @@ mod editor_config { .open(root.join(".editorconfig")) .unwrap(); - writeln!(file, "\n\n{}", data).unwrap(); + writeln!(file, "\n\n{data}").unwrap(); } #[test] diff --git a/crates/core/utils/tests/yaml_test.rs b/crates/core/utils/tests/yaml_test.rs index 3f9671ab787..49e13d6bc57 100644 --- a/crates/core/utils/tests/yaml_test.rs +++ b/crates/core/utils/tests/yaml_test.rs @@ -17,7 +17,7 @@ mod editor_config { .open(root.join(".editorconfig")) .unwrap(); - writeln!(file, "\n\n{}", data).unwrap(); + writeln!(file, "\n\n{data}").unwrap(); } #[test] diff --git a/crates/core/vcs/src/git.rs b/crates/core/vcs/src/git.rs index 24c0a5a8784..d67fe3d11bf 100644 --- a/crates/core/vcs/src/git.rs +++ b/crates/core/vcs/src/git.rs @@ -80,7 +80,7 @@ impl Git { let mut candidates = string_vec![base.to_owned()]; for remote in &self.config.remote_candidates { - candidates.push(format!("{}/{}", remote, base)); + candidates.push(format!("{remote}/{base}")); } // To start, we need to find a working base origin @@ -375,7 +375,7 @@ impl Vcs for Git { }; Ok(self - .get_touched_files_between_revisions(&format!("{}~1", rev), rev) + .get_touched_files_between_revisions(&format!("{rev}~1"), rev) .await?) } @@ -477,7 +477,7 @@ impl Vcs for Git { } if default_branch.contains('/') { - return default_branch.ends_with(&format!("/{}", branch)); + return default_branch.ends_with(&format!("/{branch}")); } false diff --git a/crates/core/vcs/src/svn.rs b/crates/core/vcs/src/svn.rs index 360e8d7c66e..16bb26c6b11 100644 --- a/crates/core/vcs/src/svn.rs +++ b/crates/core/vcs/src/svn.rs @@ -262,7 +262,7 @@ impl Vcs for Svn { self.create_command(vec![ "diff", "-r", - &format!("{}:{}", base_revision, revision), + &format!("{base_revision}:{revision}"), "--summarize", ]), false, diff --git a/crates/node/lang/src/node.rs b/crates/node/lang/src/node.rs index 89ad56d9d4f..56281dba5fa 100644 --- a/crates/node/lang/src/node.rs +++ b/crates/node/lang/src/node.rs @@ -23,7 +23,7 @@ pub fn extend_node_path>(value: T) -> String { let delimiter = if cfg!(windows) { ";" } else { ":" }; match env::var("NODE_PATH") { - Ok(old_value) => format!("{}{}{}", value, delimiter, old_value), + Ok(old_value) => format!("{value}{delimiter}{old_value}"), Err(_) => value.to_owned(), } } @@ -120,11 +120,11 @@ pub fn get_bin_name_suffix>(name: T, windows_ext: &str, flat: bool let name = name.as_ref(); if cfg!(windows) { - format!("{}.{}", name, windows_ext) + format!("{name}.{windows_ext}") } else if flat { name.to_owned() } else { - format!("bin/{}", name) + format!("bin/{name}") } } @@ -225,8 +225,7 @@ mod tests { SETLOCAL SET PATHEXT=%PATHEXT:;.JS;=;% node "%~dp0\{path}" %* -)"#, - path = path +)"# ) } diff --git a/crates/node/lang/src/yarn/mod.rs b/crates/node/lang/src/yarn/mod.rs index 328947cb688..f6e51a1e509 100644 --- a/crates/node/lang/src/yarn/mod.rs +++ b/crates/node/lang/src/yarn/mod.rs @@ -12,7 +12,7 @@ pub fn load_lockfile_dependencies(path: PathBuf) -> Result = parse_str(&yarn_lock_text) - .map_err(|e| MoonError::Generic(format!("Failed to parse lockfile: {}", e)))?; + .map_err(|e| MoonError::Generic(format!("Failed to parse lockfile: {e}")))?; for entry in entries { // All workspace dependencies have empty integrities, so we will skip them diff --git a/crates/node/platform/src/actions/sync_project.rs b/crates/node/platform/src/actions/sync_project.rs index 54292a7fd9a..e293150bc87 100644 --- a/crates/node/platform/src/actions/sync_project.rs +++ b/crates/node/platform/src/actions/sync_project.rs @@ -117,7 +117,7 @@ pub async fn sync_project( NodeVersionFormat::Version | NodeVersionFormat::VersionCaret | NodeVersionFormat::VersionTilde => { - format!("{}{}", version_prefix, dep_package_version) + format!("{version_prefix}{dep_package_version}") } _ => version_prefix, }; @@ -192,7 +192,7 @@ pub async fn sync_project( ); tsconfig_paths.insert( - format!("{}/*", dep_package_name), + format!("{dep_package_name}/*"), vec![path::to_virtual_string(dep_relative_path.join( if index.starts_with("src") { "src/*" diff --git a/crates/node/platform/src/target_hasher.rs b/crates/node/platform/src/target_hasher.rs index f7818c2596c..f61e43a535c 100644 --- a/crates/node/platform/src/target_hasher.rs +++ b/crates/node/platform/src/target_hasher.rs @@ -70,19 +70,19 @@ impl NodeTargetHasher { if let Some(compiler_options) = &tsconfig.compiler_options { if let Some(module) = &compiler_options.module { self.tsconfig_compiler_options - .insert("module".to_owned(), format!("{:?}", module)); + .insert("module".to_owned(), format!("{module:?}")); } if let Some(module_resolution) = &compiler_options.module_resolution { self.tsconfig_compiler_options.insert( "module_resolution".to_owned(), - format!("{:?}", module_resolution), + format!("{module_resolution:?}"), ); } if let Some(target) = &compiler_options.target { self.tsconfig_compiler_options - .insert("target".to_owned(), format!("{:?}", target)); + .insert("target".to_owned(), format!("{target:?}")); } } } diff --git a/crates/node/platform/src/task.rs b/crates/node/platform/src/task.rs index 8beb360c9e7..62cc4f079e9 100644 --- a/crates/node/platform/src/task.rs +++ b/crates/node/platform/src/task.rs @@ -495,7 +495,7 @@ impl<'a> ScriptParser<'a> { )? { if !previous_task_id.is_empty() { if let Some(task) = self.tasks.get_mut(&task_id) { - add_task_dep(task, format!("~:{}", previous_task_id)); + add_task_dep(task, format!("~:{previous_task_id}")); } } @@ -539,9 +539,9 @@ impl<'a> ScriptParser<'a> { if self.pre.contains_key(script_name) { let pre = self.pre.remove(script_name).unwrap(); - if let Some(pre_task_id) = self.parse_script(format!("pre{}", script_name), pre)? { + if let Some(pre_task_id) = self.parse_script(format!("pre{script_name}"), pre)? { if let Some(task) = self.tasks.get_mut(task_id) { - add_task_dep(task, format!("~:{}", pre_task_id)); + add_task_dep(task, format!("~:{pre_task_id}")); } } } @@ -550,9 +550,9 @@ impl<'a> ScriptParser<'a> { if self.post.contains_key(script_name) { let post = self.post.remove(script_name).unwrap(); - if let Some(post_task_id) = self.parse_script(format!("post{}", script_name), post)? { + if let Some(post_task_id) = self.parse_script(format!("post{script_name}"), post)? { if let Some(task) = self.tasks.get_mut(&post_task_id) { - add_task_dep(task, format!("~:{}", task_id)); + add_task_dep(task, format!("~:{task_id}")); } } } diff --git a/crates/node/tool/src/node_tool.rs b/crates/node/tool/src/node_tool.rs index 68abbab9607..f517b56ce8a 100644 --- a/crates/node/tool/src/node_tool.rs +++ b/crates/node/tool/src/node_tool.rs @@ -159,7 +159,7 @@ impl Tool for NodeTool { }; if setup || !self.tool.get_install_dir()?.exists() { - print_checkpoint(format!("installing node v{}", version), Checkpoint::Setup); + print_checkpoint(format!("installing node v{version}"), Checkpoint::Setup); if self.tool.setup(&version).await? { last_versions.insert("node".into(), version.to_string()); diff --git a/crates/node/tool/src/pnpm_tool.rs b/crates/node/tool/src/pnpm_tool.rs index 9b317865dd4..55b775577b0 100644 --- a/crates/node/tool/src/pnpm_tool.rs +++ b/crates/node/tool/src/pnpm_tool.rs @@ -197,7 +197,7 @@ impl DependencyManager for PnpmTool { }); // https://pnpm.io/filtering#--filter-package_name-1 - cmd.arg(format!("{}...", package)); + cmd.arg(format!("{package}...")); } cmd.exec_stream_output().await?; diff --git a/crates/proto/cli/src/config.rs b/crates/proto/cli/src/config.rs index 614090966f9..22e4c092d79 100644 --- a/crates/proto/cli/src/config.rs +++ b/crates/proto/cli/src/config.rs @@ -31,7 +31,7 @@ impl Config { } else { return Err(ProtoError::InvalidConfig( path.to_path_buf(), - format!("Expected a version string for \"{}\".", key), + format!("Expected a version string for \"{key}\"."), )); } } diff --git a/crates/proto/core/src/helpers.rs b/crates/proto/core/src/helpers.rs index 4f1a01aeb15..59699347761 100644 --- a/crates/proto/core/src/helpers.rs +++ b/crates/proto/core/src/helpers.rs @@ -38,7 +38,7 @@ pub fn add_v_prefix(value: &str) -> String { return value.to_lowercase(); } - format!("v{}", value) + format!("v{value}") } pub fn remove_v_prefix(value: &str) -> String { diff --git a/crates/proto/node/src/depman/execute.rs b/crates/proto/node/src/depman/execute.rs index bb16884561e..897ae85c663 100644 --- a/crates/proto/node/src/depman/execute.rs +++ b/crates/proto/node/src/depman/execute.rs @@ -57,7 +57,7 @@ impl Executable<'_> for NodeDependencyManager { return Err(ProtoError::ExecuteMissingBin( self.get_name(), - install_dir.join(format!("bin/{}.js", bin_name)), + install_dir.join(format!("bin/{bin_name}.js")), )); } diff --git a/crates/typescript/lang/src/tsconfig.rs b/crates/typescript/lang/src/tsconfig.rs index c42076dc121..939fb68a07a 100644 --- a/crates/typescript/lang/src/tsconfig.rs +++ b/crates/typescript/lang/src/tsconfig.rs @@ -94,7 +94,7 @@ impl TsConfigJson { // File name is optional when using standard naming if tsconfig_name != "tsconfig.json" { - path = format!("{}/{}", path, tsconfig_name) + path = format!("{path}/{tsconfig_name}") }; let mut references = match &self.references { diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 0d38747e296..b307b15a052 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -7,6 +7,10 @@ - Fixed an issue where `moon query projects --affected` would hang indefinitely waiting for stdin. - Fixed an issue where changing `projects` globs wouldn't immediately invalidate the cache. +#### ⚙️ Internal + +- Updated Rust to v1.67. + ## 0.24.2 #### 🚀 Updates diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 207bfd8479f..8407bbb39dc 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -2,4 +2,4 @@ # The default profile includes rustc, rust-std, cargo, rust-docs, rustfmt and clippy. # https://rust-lang.github.io/rustup/concepts/profiles.html profile = "default" -channel = "1.66.0" +channel = "1.67.0" diff --git a/scripts/Dockerfile b/scripts/Dockerfile index b6fedc2b853..917fa3e8fdb 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -5,7 +5,7 @@ # glibc -FROM rust:1.66.0 AS base-gnu +FROM rust:1.67.0 AS base-gnu RUN cargo install cargo-chef --version ^0.1 WORKDIR /app COPY .cargo .cargo