From ae6b820686664c77fbe1c16481001c101f15bc47 Mon Sep 17 00:00:00 2001 From: LuuuX Date: Thu, 11 Jan 2024 19:19:54 +0800 Subject: [PATCH] fmt code --- src/cargo/sources/source.rs | 2 +- .../add_no_vendored_packages_with_vendor/mod.rs | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/cargo/sources/source.rs b/src/cargo/sources/source.rs index ab8b0fe99b09..eac6e49c32e9 100644 --- a/src/cargo/sources/source.rs +++ b/src/cargo/sources/source.rs @@ -180,7 +180,7 @@ pub enum QueryKind { /// whereas an `Registry` source may return dependencies that have the same /// canonicalization. Alternatives, - /// Match a denpendency in all ways and will normalize the package name. + /// Match a denpendency in all ways and will normalize the package name. /// Each source defines what normalizing means. Normalized, } diff --git a/tests/testsuite/cargo_add/add_no_vendored_packages_with_vendor/mod.rs b/tests/testsuite/cargo_add/add_no_vendored_packages_with_vendor/mod.rs index 2a7e5d380534..8e388686de4e 100644 --- a/tests/testsuite/cargo_add/add_no_vendored_packages_with_vendor/mod.rs +++ b/tests/testsuite/cargo_add/add_no_vendored_packages_with_vendor/mod.rs @@ -1,7 +1,7 @@ -use cargo_test_support::ProjectBuilder; use cargo_test_support::compare::assert_ui; use cargo_test_support::paths; use cargo_test_support::prelude::*; +use cargo_test_support::ProjectBuilder; use cargo_test_support::curr_dir; @@ -20,8 +20,9 @@ fn case() { .publish(); let project = ProjectBuilder::new(paths::root().join("in")) - .file(".cargo/config", -r#" + .file( + ".cargo/config", + r#" [source.crates-io] replace-with = "vendored-sources" @@ -32,7 +33,7 @@ directory = "./vendor" .file("src/lib.rs", "") .file( "Cargo.toml", -r#" + r#" [workspace] [package] @@ -43,7 +44,7 @@ version = "0.0.0" .build(); let project_root = project.root(); let cwd = &project_root; - + snapbox::cmd::Command::cargo_ui() .arg("add") .arg_line("linked_hash_map --registry alternative")