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-diff/src (3 of 275 files). Show all

Unified · Split

3 files
  1. git-diff/src/tree/changes.rs +6 −4
  2. git-diff/src/tree/mod.rs +2 −1
  3. git-diff/src/tree/recorder.rs +4 −2
git-diff/src/tree/changes.rs+6−4
@@ -1,11 +1,13 @@
1use std::{borrow::BorrowMut, collections::VecDeque};
2
3use git_hash::{oid, ObjectId};
4use git_object::immutable;
5use quick_error::quick_error;
6
1use crate::{7use crate::{
2 tree,8 tree,
3 tree::{visit::Change, TreeInfoPair},9 tree::{visit::Change, TreeInfoPair},
4};10};
5use git_hash::{oid, ObjectId};
6use git_object::immutable;
7use quick_error::quick_error;
8use std::{borrow::BorrowMut, collections::VecDeque};
9 11
10quick_error! {12quick_error! {
11 /// The error returned by [tree::Changes::needed_to_obtain()].13 /// The error returned by [tree::Changes::needed_to_obtain()].
git-diff/src/tree/mod.rs+2−1
@@ -1,6 +1,7 @@
1use std::collections::VecDeque;
2
1use git_hash::ObjectId;3use git_hash::ObjectId;
2use git_object::immutable;4use git_object::immutable;
3use std::collections::VecDeque;
4 5
5/// The state required to visit [Changes] to be instantiated with `State::default()`.6/// The state required to visit [Changes] to be instantiated with `State::default()`.
6#[derive(Default, Clone)]7#[derive(Default, Clone)]
git-diff/src/tree/recorder.rs+4−2
@@ -1,10 +1,12 @@
1use crate::tree::visit;1use std::collections::{BTreeMap, VecDeque};
2
2use git_hash::ObjectId;3use git_hash::ObjectId;
3use git_object::{4use git_object::{
4 bstr::{BStr, BString, ByteSlice, ByteVec},5 bstr::{BStr, BString, ByteSlice, ByteVec},
5 tree,6 tree,
6};7};
7use std::collections::{BTreeMap, VecDeque};8
9use crate::tree::visit;
8 10
9/// A Change as observed by a call to [`visit(…)`][visit::Visit::visit()], enhanced with the path affected by the change.11/// A Change as observed by a call to [`visit(…)`][visit::Visit::visit()], enhanced with the path affected by the change.
10/// Its similar to [visit::Change] but includes the path that changed.12/// Its similar to [visit::Change] but includes the path that changed.