History

Apply nightly rustfmt rules.

Applied via `make rustfmt`, which enables these nightly-only rules: ``` group_imports = "StdExternalCrate" imports_granularity = "Crate" ``` Keep git-config in its original form for now

Conor Davis committed 5 years ago

Commit 5e0edba1 parent 19f21a4275 files · +1173 −723Browse files

Showing the changes to git-commitgraph/src/file (5 of 275 files). Show all

Unified · Split

5 files
  1. git-commitgraph/src/file/access.rs +4 −2
  2. git-commitgraph/src/file/commit.rs +8 −6
  3. git-commitgraph/src/file/init.rs +7 −5
  4. git-commitgraph/src/file/mod.rs +4 −4
  5. git-commitgraph/src/file/verify.rs +8 −6
git-commitgraph/src/file/access.rs+4−2
@@ -1,11 +1,13 @@
1−use crate::file::{self, commit::Commit, File, COMMIT_DATA_ENTRY_SIZE};
2−use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
31 use std::{
42 convert::TryInto,
53 fmt::{Debug, Formatter},
64 path::Path,
75 };
86
7+use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
8+
9+use crate::file::{self, commit::Commit, File, COMMIT_DATA_ENTRY_SIZE};
10+
911 /// Access
1012 impl File {
1113 /// The number of base graphs that this file depends on.
git-commitgraph/src/file/commit.rs+8−6
@@ -1,16 +1,18 @@
11 //! Low-level operations on individual commits.
2−use crate::{
3− file::{self, File},
4− graph,
5−};
6−use byteorder::{BigEndian, ByteOrder};
7−use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
82 use std::{
93 convert::TryInto,
104 fmt::{Debug, Formatter},
115 slice::Chunks,
126 };
137
8+use byteorder::{BigEndian, ByteOrder};
9+use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
10+
11+use crate::{
12+ file::{self, File},
13+ graph,
14+};
15+
1416 /// The error used in the [`file::commit`][self] module.
1517 #[derive(thiserror::Error, Debug)]
1618 #[allow(missing_docs)]
git-commitgraph/src/file/init.rs+7−5
@@ -1,14 +1,16 @@
1−use crate::file::{File, COMMIT_DATA_ENTRY_SIZE, FAN_LEN, SIGNATURE};
2−use bstr::ByteSlice;
3−use byteorder::{BigEndian, ByteOrder};
4−use filebuffer::FileBuffer;
5−use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
61 use std::{
72 convert::{TryFrom, TryInto},
83 ops::Range,
94 path::Path,
105 };
116
7+use bstr::ByteSlice;
8+use byteorder::{BigEndian, ByteOrder};
9+use filebuffer::FileBuffer;
10+use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
11+
12+use crate::file::{File, COMMIT_DATA_ENTRY_SIZE, FAN_LEN, SIGNATURE};
13+
1214 type ChunkId = [u8; 4];
1315
1416 /// The error used in [`File::at()`].
git-commitgraph/src/file/mod.rs+4−4
@@ -8,16 +8,16 @@ pub use commit::Commit; · 7 unmodified lines
88 mod init;
99 pub mod verify;
1010
11−pub use init::Error;
12−
13−use filebuffer::FileBuffer;
14−use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
1511 use std::{
1612 fmt::{Display, Formatter},
1713 ops::Range,
1814 path::PathBuf,
1915 };
2016
17+use filebuffer::FileBuffer;
18+use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
19+pub use init::Error;
20+
2121 const COMMIT_DATA_ENTRY_SIZE: usize = SHA1_SIZE + 16;
2222 const FAN_LEN: usize = 256;
2323 const SIGNATURE: &[u8] = b"CGPH";
git-commitgraph/src/file/verify.rs+8−6
@@ -1,16 +1,18 @@
11 //! Auxiliary types used in commit graph file verification methods.
2−use crate::{
3− file::{self, File},
4− GENERATION_NUMBER_INFINITY, GENERATION_NUMBER_MAX,
5−};
6−use bstr::ByteSlice;
7−use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
82 use std::{
93 cmp::{max, min},
104 collections::HashMap,
115 path::Path,
126 };
137
8+use bstr::ByteSlice;
9+use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
10+
11+use crate::{
12+ file::{self, File},
13+ GENERATION_NUMBER_INFINITY, GENERATION_NUMBER_MAX,
14+};
15+
1416 /// The error used in [`File::traverse()`].
1517 #[derive(thiserror::Error, Debug)]
1618 #[allow(missing_docs)]