Skip to content

Commit 1ce8023

Browse files
committed
Rustfmt 2024
1 parent fb0c7c9 commit 1ce8023

File tree

498 files changed

+1305
-1136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

498 files changed

+1305
-1136
lines changed

benches/benchsuite/benches/global_cache_tracker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! Benchmarks for the global cache tracker.
22
33
use cargo::core::global_cache_tracker::{self, DeferredGlobalLastUse, GlobalCacheTracker};
4+
use cargo::util::GlobalContext;
45
use cargo::util::cache_lock::CacheLockMode;
56
use cargo::util::interning::InternedString;
6-
use cargo::util::GlobalContext;
7-
use criterion::{criterion_group, criterion_main, Criterion};
7+
use criterion::{Criterion, criterion_group, criterion_main};
88
use std::fs;
99
use std::path::{Path, PathBuf};
1010

benches/benchsuite/benches/resolve.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use benchsuite::fixtures;
2+
use cargo::GlobalContext;
23
use cargo::core::compiler::{CompileKind, RustcTargetData};
34
use cargo::core::resolver::features::{FeatureOpts, FeatureResolver};
45
use cargo::core::resolver::{CliFeatures, ForceAllTargets, HasDevUnits, ResolveBehavior};
56
use cargo::core::{PackageIdSpec, Workspace};
67
use cargo::ops::WorkspaceResolve;
7-
use cargo::GlobalContext;
8-
use criterion::{criterion_group, criterion_main, Criterion};
8+
use criterion::{Criterion, criterion_group, criterion_main};
99
use std::path::Path;
1010

1111
struct ResolveInfo<'gctx> {

benches/benchsuite/benches/workspace_initialization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use benchsuite::fixtures;
22
use cargo::core::Workspace;
3-
use criterion::{criterion_group, criterion_main, Criterion};
3+
use criterion::{Criterion, criterion_group, criterion_main};
44

55
fn workspace_initialization(c: &mut Criterion) {
66
let fixtures = fixtures!();

benches/benchsuite/src/bin/capture-last-use.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
//! The database is kept in git. It usually shouldn't need to be re-generated
1313
//! unless there is a change in the schema or the benchmark.
1414
15+
use cargo::GlobalContext;
1516
use cargo::core::global_cache_tracker::{self, DeferredGlobalLastUse, GlobalCacheTracker};
1617
use cargo::util::cache_lock::CacheLockMode;
17-
use cargo::GlobalContext;
1818
use rand::prelude::*;
1919
use std::collections::HashMap;
2020
use std::fs;

crates/cargo-platform/src/cfg.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,11 @@ impl<'a> Parser<'a> {
261261
expected: "a string",
262262
found: t.classify(),
263263
},
264-
))
264+
));
265265
}
266266
Some(Err(e)) => return Err(e),
267267
None => {
268-
return Err(ParseError::new(self.t.orig, IncompleteExpr("a string")))
268+
return Err(ParseError::new(self.t.orig, IncompleteExpr("a string")));
269269
}
270270
};
271271
Cfg::KeyPair(

crates/cargo-test-support/src/compare.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
use crate::cross_compile::try_alternate;
4545
use crate::paths;
4646
use crate::rustc_host;
47-
use anyhow::{bail, Result};
47+
use anyhow::{Result, bail};
4848
use snapbox::Data;
4949
use snapbox::IntoData;
5050
use std::fmt;

crates/cargo-test-support/src/containers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use std::collections::HashMap;
1212
use std::io::Read;
1313
use std::path::PathBuf;
1414
use std::process::Command;
15-
use std::sync::atomic::{AtomicUsize, Ordering};
1615
use std::sync::Mutex;
16+
use std::sync::atomic::{AtomicUsize, Ordering};
1717
use tar::Header;
1818

1919
/// A builder for configuring a container to run.

crates/cargo-test-support/src/git.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
//! tags), you can use `git2::Repository::open()` to open the repository and then
4141
//! use some of the helper functions in this file to interact with the repository.
4242
43-
use crate::{paths::CargoPathExt, project, Project, ProjectBuilder, SymlinkBuilder};
43+
use crate::{Project, ProjectBuilder, SymlinkBuilder, paths::CargoPathExt, project};
4444
use std::fs;
4545
use std::path::{Path, PathBuf};
4646
use std::sync::Once;
@@ -146,7 +146,7 @@ pub fn init(path: &Path) -> git2::Repository {
146146

147147
fn default_search_path() {
148148
use crate::paths::global_root;
149-
use git2::{opts::set_search_path, ConfigLevel};
149+
use git2::{ConfigLevel, opts::set_search_path};
150150

151151
static INIT: Once = Once::new();
152152
INIT.call_once(|| unsafe {

crates/cargo-test-support/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ use std::sync::OnceLock;
5454
use std::thread::JoinHandle;
5555
use std::time::{self, Duration};
5656

57-
use anyhow::{bail, Result};
58-
use cargo_util::{is_ci, ProcessError};
57+
use anyhow::{Result, bail};
58+
use cargo_util::{ProcessError, is_ci};
5959
use snapbox::IntoData as _;
6060
use url::Url;
6161

@@ -112,11 +112,11 @@ pub mod publish;
112112
pub mod registry;
113113

114114
pub mod prelude {
115-
pub use crate::cargo_test;
116-
pub use crate::paths::CargoPathExt;
117115
pub use crate::ArgLineCommandExt;
118116
pub use crate::ChannelChangerCommandExt;
119117
pub use crate::TestEnvCommandExt;
118+
pub use crate::cargo_test;
119+
pub use crate::paths::CargoPathExt;
120120
pub use snapbox::IntoData;
121121
}
122122

crates/cargo-test-support/src/paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ use std::fs;
88
use std::io::{self, ErrorKind};
99
use std::path::{Path, PathBuf};
1010
use std::process::Command;
11-
use std::sync::atomic::{AtomicUsize, Ordering};
1211
use std::sync::Mutex;
1312
use std::sync::OnceLock;
13+
use std::sync::atomic::{AtomicUsize, Ordering};
1414

1515
static CARGO_INTEGRATION_TEST_DIR: &str = "cit";
1616

0 commit comments

Comments
 (0)