Skip to content

Commit c3c6504

Browse files
committed
j fmt
1 parent 6f009d7 commit c3c6504

File tree

265 files changed

+1254
-874
lines changed

Some content is hidden

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

265 files changed

+1254
-874
lines changed

gitoxide-core/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@
3030
#![deny(rust_2018_idioms)]
3131
#![forbid(unsafe_code)]
3232

33-
use anyhow::bail;
3433
use std::str::FromStr;
3534

35+
use anyhow::bail;
36+
3637
#[derive(Debug, Eq, PartialEq, Hash, Clone, Copy)]
3738
pub enum OutputFormat {
3839
Human,

gitoxide-core/src/organize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use std::borrow::Cow;
21
use std::{
2+
borrow::Cow,
33
ffi::OsStr,
44
path::{Path, PathBuf},
55
};

gitoxide-core/src/pack/receive.rs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use crate::net;
2-
use crate::pack::receive::protocol::fetch::negotiate;
3-
use crate::OutputFormat;
4-
use gix::config::tree::Key;
5-
use gix::protocol::maybe_async;
6-
use gix::remote::fetch::Error;
7-
use gix::DynNestedProgress;
1+
use std::{
2+
io,
3+
path::PathBuf,
4+
sync::{atomic::AtomicBool, Arc},
5+
};
6+
7+
use gix::{config::tree::Key, protocol::maybe_async, remote::fetch::Error, DynNestedProgress};
88
pub use gix::{
99
hash::ObjectId,
1010
objs::bstr::{BString, ByteSlice},
@@ -18,11 +18,8 @@ pub use gix::{
1818
},
1919
NestedProgress, Progress,
2020
};
21-
use std::{
22-
io,
23-
path::PathBuf,
24-
sync::{atomic::AtomicBool, Arc},
25-
};
21+
22+
use crate::{net, pack::receive::protocol::fetch::negotiate, OutputFormat};
2623

2724
pub const PROGRESS_RANGE: std::ops::RangeInclusive<u8> = 1..=3;
2825
pub struct Context<W> {

gitoxide-core/src/repository/attributes/query.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ pub struct Options {
88
}
99

1010
pub(crate) mod function {
11+
use std::{borrow::Cow, io, path::Path};
12+
1113
use anyhow::bail;
1214
use gix::bstr::BStr;
13-
use std::borrow::Cow;
14-
use std::{io, path::Path};
1515

1616
use crate::{
1717
is_dir_to_mode,

gitoxide-core/src/repository/blame.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use gix::bstr::ByteSlice;
2-
use gix::config::tree;
31
use std::ffi::OsStr;
42

3+
use gix::{bstr::ByteSlice, config::tree};
4+
55
pub fn blame_file(
66
mut repo: gix::Repository,
77
file: &OsStr,

gitoxide-core/src/repository/cat.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
use crate::repository::revision::resolve::{BlobFormat, TreeMode};
21
use anyhow::{anyhow, Context};
3-
use gix::diff::blob::ResourceKind;
4-
use gix::filter::plumbing::driver::apply::Delay;
5-
use gix::revision::Spec;
2+
use gix::{diff::blob::ResourceKind, filter::plumbing::driver::apply::Delay, revision::Spec};
3+
4+
use crate::repository::revision::resolve::{BlobFormat, TreeMode};
65

76
pub fn display_object(
87
repo: &gix::Repository,

gitoxide-core/src/repository/clean.rs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,23 @@ pub struct Options {
2020
pub find_untracked_repositories: FindRepository,
2121
}
2222
pub(crate) mod function {
23-
use crate::repository::clean::{FindRepository, Options};
24-
use crate::OutputFormat;
23+
use std::{borrow::Cow, path::Path};
24+
2525
use anyhow::bail;
26-
use gix::bstr::BString;
27-
use gix::bstr::ByteSlice;
28-
use gix::dir::entry::{Kind, Status};
29-
use gix::dir::walk::EmissionMode::CollapseDirectory;
30-
use gix::dir::walk::ForDeletionMode::*;
31-
use gix::dir::{walk, EntryRef};
32-
use std::borrow::Cow;
33-
use std::path::Path;
26+
use gix::{
27+
bstr::{BString, ByteSlice},
28+
dir::{
29+
entry::{Kind, Status},
30+
walk,
31+
walk::{EmissionMode::CollapseDirectory, ForDeletionMode::*},
32+
EntryRef,
33+
},
34+
};
35+
36+
use crate::{
37+
repository::clean::{FindRepository, Options},
38+
OutputFormat,
39+
};
3440

3541
pub fn clean(
3642
repo: gix::Repository,

gitoxide-core/src/repository/diff.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
use anyhow::Context;
2-
use gix::bstr::{BString, ByteSlice};
3-
use gix::diff::blob::intern::TokenSource;
4-
use gix::diff::blob::unified_diff::{ContextSize, NewlineSeparator};
5-
use gix::diff::blob::UnifiedDiff;
6-
use gix::objs::tree::EntryMode;
7-
use gix::odb::store::RefreshMode;
8-
use gix::prelude::ObjectIdExt;
9-
use gix::ObjectId;
2+
use gix::{
3+
bstr::{BString, ByteSlice},
4+
diff::blob::{
5+
intern::TokenSource,
6+
unified_diff::{ContextSize, NewlineSeparator},
7+
UnifiedDiff,
8+
},
9+
objs::tree::EntryMode,
10+
odb::store::RefreshMode,
11+
prelude::ObjectIdExt,
12+
ObjectId,
13+
};
1014

1115
pub fn tree(
1216
mut repo: gix::Repository,

gitoxide-core/src/repository/dirty.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
use crate::OutputFormat;
21
use anyhow::bail;
32

3+
use crate::OutputFormat;
4+
45
pub enum Mode {
56
IsClean,
67
IsDirty,

gitoxide-core/src/repository/index/entries.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ pub(crate) mod function {
2323
io::{BufWriter, Write},
2424
};
2525

26-
use gix::index::entry::Stage;
2726
use gix::{
2827
bstr::{BStr, BString},
28+
index::entry::Stage,
2929
worktree::IndexPersistedOrInMemory,
3030
Repository,
3131
};

0 commit comments

Comments
 (0)