History

make fmt (#301)

Sebastian Thiel committed 4 years ago

Commit 636fa8a1 parent cdca1df4 files · +17 −10Browse files

Unified · Split

4 files
  1. git-index/src/lib.rs +2 −1
  2. git-worktree/src/lib.rs +9 −5
  3. git-worktree/tests/copy_index/mod.rs +5 −4
  4. git-worktree/tests/mod.rs +1 −0
git-index/src/lib.rs+2−1
@@ -12,9 +12,10 @@ pub(crate) mod extension; · 11 unmodified lines
1212 pub mod entry;
1313
1414 mod access {
15− use crate::{Entry, State, Version};
1615 use bstr::{BStr, ByteSlice};
1716
17+ use crate::{Entry, State, Version};
18+
1819 impl State {
1920 pub fn version(&self) -> Version {
2021 self.version
git-worktree/src/lib.rs+9−5
@@ -64,14 +64,18 @@ pub mod index { · 63 unmodified lines
6464 }
6565
6666 pub(crate) mod entry {
67− use crate::index;
67+ use std::{
68+ convert::TryInto,
69+ fs::{create_dir_all, OpenOptions},
70+ io::Write,
71+ time::Duration,
72+ };
73+
6874 use git_hash::oid;
6975 use git_index::Entry;
7076 use git_object::bstr::{BStr, ByteSlice};
71− use std::convert::TryInto;
72− use std::fs::{create_dir_all, OpenOptions};
73− use std::io::Write;
74− use std::time::Duration;
77+
78+ use crate::index;
7579
7680 pub fn checkout<Find>(
7781 entry: &mut Entry,
git-worktree/tests/copy_index/mod.rs+5−4
@@ -1,11 +1,12 @@
1−use crate::{dir_structure, fixture_path};
1+use std::fs;
2+#[cfg(unix)]
3+use std::os::unix::prelude::MetadataExt;
4+
25 use git_object::bstr::ByteSlice;
36 use git_odb::FindExt;
47 use git_worktree::index;
5−use std::fs;
68
7−#[cfg(unix)]
8−use std::os::unix::prelude::MetadataExt;
9+use crate::{dir_structure, fixture_path};
910
1011 #[test]
1112 fn test_copy_index() -> crate::Result<()> {
git-worktree/tests/mod.rs+1−0
@@ -1,4 +1,5 @@
11 use std::path::{Path, PathBuf};
2+
23 use walkdir::WalkDir;
34
45 mod copy_index;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t