Skip to content

Commit c3daec7

Browse files
committed
Normalize imports
I.e. using: cargo +nightly fmt -- \ --config group_imports=StdExternalCrate,imports_granularity=crate
1 parent 2706a13 commit c3daec7

File tree

14 files changed

+27
-38
lines changed

14 files changed

+27
-38
lines changed

src/cmd/completion/bash.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
//! `stg completion bash` implementation.
44
5-
use anyhow::Result;
6-
75
use std::{format as f, path::PathBuf};
86

7+
use anyhow::Result;
8+
99
use super::shstream::ShStream;
1010

1111
pub(super) fn command() -> clap::Command {

src/cmd/completion/fish.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
//! `stg completion fish` implementation
44
5-
use anyhow::Result;
6-
75
use std::{format as f, path::PathBuf};
86

7+
use anyhow::Result;
8+
99
use super::shstream::ShStream;
1010

1111
pub(super) fn command() -> clap::Command {

src/cmd/new.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use anyhow::{anyhow, Result};
88
use clap::{Arg, ArgGroup, ArgMatches};
99

1010
use super::refresh;
11-
1211
use crate::{
1312
color::get_color_stdout,
1413
patchedit,

src/cmd/redo.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
use anyhow::Result;
66
use clap::Arg;
77

8-
use crate::color::get_color_stdout;
9-
use crate::stack::Stack;
10-
118
use super::undo::find_undo_state;
9+
use crate::{color::get_color_stdout, stack::Stack};
1210

1311
pub(super) const STGIT_COMMAND: super::StGitCommand = super::StGitCommand {
1412
name: "redo",

src/cmd/squash.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
//! `stg squash` implementation.
44
5-
use std::fmt::Write;
6-
use std::str::FromStr;
5+
use std::{fmt::Write, str::FromStr};
76

87
use anyhow::{anyhow, Result};
98
use clap::{Arg, ArgMatches};

src/patchedit/interactive.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
//! Functions for conducting interactive patch edit session.
44
5-
use std::ffi::OsString;
6-
use std::fs::File;
7-
use std::io::{BufWriter, Write};
8-
use std::path::Path;
5+
use std::{
6+
ffi::OsString,
7+
fs::File,
8+
io::{BufWriter, Write},
9+
path::Path,
10+
};
911

1012
use anyhow::{anyhow, Result};
1113

src/patchedit/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ use clap::{
2222
builder::{self, ValueParser},
2323
Arg, ArgMatches, ValueHint,
2424
};
25+
use description::{DiffBuffer, EditablePatchDescription, EditedPatchDescription};
26+
pub(crate) use interactive::call_editor;
27+
use interactive::edit_interactive;
2528

2629
use crate::{
2730
commit::{CommitExtended, CommitMessage, RepositoryCommitExtended},
@@ -31,10 +34,6 @@ use crate::{
3134
stupid::Stupid,
3235
};
3336

34-
use description::{DiffBuffer, EditablePatchDescription, EditedPatchDescription};
35-
pub(crate) use interactive::call_editor;
36-
use interactive::edit_interactive;
37-
3837
/// Add patch editing options to a StGit command.
3938
pub(crate) fn add_args(
4039
command: clap::Command,

src/stack/access.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
//! The [`StackStateAccess`] trait allows uniform access to stack information for
44
//! stack-like objects.
55
6-
use crate::patchname::PatchName;
7-
86
use super::{
97
iter::{AllPatches, BothPatches},
108
state::PatchState,
119
};
10+
use crate::patchname::PatchName;
1211

1312
/// Trait for accessing stack state.
1413
///

src/stack/iter.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
//! Patch name iterators.
44
5-
use std::iter::Chain;
6-
use std::slice::Iter;
5+
use std::{iter::Chain, slice::Iter};
76

87
use crate::patchname::PatchName;
98

src/stack/stack.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
//! High-level StGit stack representation.
44
5-
use std::collections::BTreeMap;
6-
use std::str::FromStr;
5+
use std::{collections::BTreeMap, str::FromStr};
76

87
use anyhow::{anyhow, Result};
98

0 commit comments

Comments
 (0)