Skip to content

Commit 0700b09

Browse files
committed
make fmt
1 parent 3d7fc18 commit 0700b09

File tree

12 files changed

+29
-24
lines changed

12 files changed

+29
-24
lines changed

Diff for: git-config/src/file/section.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ use std::{
66

77
use bstr::{BStr, BString, ByteVec};
88

9-
use crate::file::Size;
10-
use crate::value::normalize_bstr;
119
use crate::{
12-
file::Index,
10+
file::{Index, Size},
1311
lookup, parse,
1412
parse::{section::Key, Event},
15-
value::{normalize, normalize_bstring},
13+
value::{normalize, normalize_bstr, normalize_bstring},
1614
};
1715

1816
/// A opaque type that represents a mutable reference to a section.

Diff for: git-config/src/parse/nom/tests.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,12 @@ mod section {
432432
}
433433

434434
mod value_continuation {
435+
use bstr::ByteSlice;
436+
435437
use crate::parse::{
436438
section,
437439
tests::util::{into_events, newline_event, value_done_event, value_not_done_event},
438440
};
439-
use bstr::ByteSlice;
440441

441442
pub fn value_impl<'a>(i: &'a [u8], events: &mut section::Events<'a>) -> nom::IResult<&'a [u8], ()> {
442443
super::value_impl(i, &mut |e| events.push(e)).map(|t| (t.0, ()))

Diff for: git-config/tests/file/from_env/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
use std::{borrow::Cow, env, fs};
22

3-
use crate::file::from_paths::escape_backslashes;
43
use git_config::{
54
file::{from_env, from_paths, from_paths::Options},
65
File,
76
};
87
use serial_test::serial;
98
use tempfile::tempdir;
109

10+
use crate::file::from_paths::escape_backslashes;
11+
1112
pub struct Env<'a> {
1213
altered_vars: Vec<&'a str>,
1314
}

Diff for: git-config/tests/values/path.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
mod interpolate {
2-
use git_config::path;
32
use std::{
43
borrow::Cow,
54
path::{Path, PathBuf},
65
};
76

8-
use git_config::path::interpolate::Error;
7+
use git_config::{path, path::interpolate::Error};
98

109
use crate::{file::cow_str, value::b};
1110

Diff for: git-odb/src/alternate/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
//! ```
1717
//!
1818
//! Based on the [canonical implementation](https://github.com/git/git/blob/master/sha1-file.c#L598:L609).
19-
use git_path::realpath::MAX_SYMLINKS;
2019
use std::{fs, io, path::PathBuf};
2120

21+
use git_path::realpath::MAX_SYMLINKS;
22+
2223
///
2324
pub mod parse;
2425

Diff for: git-path/src/realpath.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ pub enum Error {
1818
pub const MAX_SYMLINKS: u8 = 32;
1919

2020
pub(crate) mod function {
21-
use crate::realpath::MAX_SYMLINKS;
2221
use std::path::{
2322
Component::{CurDir, Normal, ParentDir, Prefix, RootDir},
2423
Path, PathBuf,
2524
};
2625

2726
use super::Error;
27+
use crate::realpath::MAX_SYMLINKS;
2828

2929
/// Check each component of `path` and see if it is a symlink. If so, resolve it.
3030
/// Do not fail for non-existing components, but assume these are as is.

Diff for: git-path/tests/convert/absolutize.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
use std::{borrow::Cow, path::Path};
2+
13
use git_path::absolutize;
2-
use std::borrow::Cow;
3-
use std::path::Path;
44

55
fn p(input: &str) -> &Path {
66
Path::new(input)

Diff for: git-path/tests/realpath/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
use git_path::{realpath::Error, realpath_opts};
21
use std::path::Path;
2+
3+
use git_path::{realpath::Error, realpath_opts};
34
use tempfile::tempdir;
45

56
#[test]

Diff for: git-repository/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,9 @@ pub mod state {
380380
pub mod discover {
381381
use std::path::Path;
382382

383-
use crate::bstr::BString;
384383
pub use git_discover::*;
385384

386-
use crate::ThreadSafeRepository;
385+
use crate::{bstr::BString, ThreadSafeRepository};
387386

388387
/// The error returned by [`crate::discover()`].
389388
#[derive(Debug, thiserror::Error)]

Diff for: git-revision/tests/spec/parse/navigate/tilde_symbol.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use git_revision::spec;
2-
use git_revision::spec::parse::delegate::Traversal;
1+
use git_revision::{spec, spec::parse::delegate::Traversal};
32

43
use crate::spec::parse::{parse, try_parse};
54

Diff for: gitoxide-core/src/repository/revision/explain.rs

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
#![allow(unused_variables)]
22

3+
use std::ffi::OsString;
4+
35
use anyhow::bail;
4-
use git::bstr::{BStr, BString, ByteSlice};
5-
use git::revision::spec::parse::{delegate, Delegate};
6-
use git::revision::{
7-
spec,
8-
spec::parse::delegate::{PeelTo, ReflogLookup, SiblingBranch, Traversal},
6+
use git::{
7+
bstr::{BStr, BString, ByteSlice},
8+
revision::{
9+
spec,
10+
spec::parse::{
11+
delegate,
12+
delegate::{PeelTo, ReflogLookup, SiblingBranch, Traversal},
13+
Delegate,
14+
},
15+
},
916
};
1017
use git_repository as git;
11-
use std::ffi::OsString;
1218

1319
pub fn explain(_repo: git::Repository, spec: OsString, mut out: impl std::io::Write) -> anyhow::Result<()> {
1420
let mut explain = Explain::new(&mut out);

Diff for: src/porcelain/options.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ pub struct EstimateHours {
106106
}
107107

108108
mod validator {
109-
use git_repository as git;
110109
use std::{ffi::OsStr, path::PathBuf};
111110

112111
use anyhow::Context;
112+
use git_repository as git;
113113

114114
fn is_repo_inner(dir: &OsStr) -> anyhow::Result<()> {
115115
let git_dir = PathBuf::from(dir).join(".git");

0 commit comments

Comments
 (0)