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
12pub mod entry;12pub mod entry;
13 13
14mod access {14mod access {
15 use crate::{Entry, State, Version};
16 use bstr::{BStr, ByteSlice};15 use bstr::{BStr, ByteSlice};
17 16
17 use crate::{Entry, State, Version};
18
18 impl State {19 impl State {
19 pub fn version(&self) -> Version {20 pub fn version(&self) -> Version {
20 self.version21 self.version
git-worktree/src/lib.rs+9−5
@@ -64,14 +64,18 @@ pub mod index { · 63 unmodified lines
64 }64 }
65 65
66 pub(crate) mod entry {66 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
68 use git_hash::oid;74 use git_hash::oid;
69 use git_index::Entry;75 use git_index::Entry;
70 use git_object::bstr::{BStr, ByteSlice};76 use git_object::bstr::{BStr, ByteSlice};
71 use std::convert::TryInto;77
72 use std::fs::{create_dir_all, OpenOptions};78 use crate::index;
73 use std::io::Write;
74 use std::time::Duration;
75 79
76 pub fn checkout<Find>(80 pub fn checkout<Find>(
77 entry: &mut Entry,81 entry: &mut Entry,
git-worktree/tests/copy_index/mod.rs+5−4
@@ -1,11 +1,12 @@
1use crate::{dir_structure, fixture_path};1use std::fs;
2#[cfg(unix)]
3use std::os::unix::prelude::MetadataExt;
4
2use git_object::bstr::ByteSlice;5use git_object::bstr::ByteSlice;
3use git_odb::FindExt;6use git_odb::FindExt;
4use git_worktree::index;7use git_worktree::index;
5use std::fs;
6 8
7#[cfg(unix)]9use crate::{dir_structure, fixture_path};
8use std::os::unix::prelude::MetadataExt;
9 10
10#[test]11#[test]
11fn test_copy_index() -> crate::Result<()> {12fn test_copy_index() -> crate::Result<()> {
git-worktree/tests/mod.rs+1−0
@@ -1,4 +1,5 @@
1use std::path::{Path, PathBuf};1use std::path::{Path, PathBuf};
2
2use walkdir::WalkDir;3use walkdir::WalkDir;
3 4
4mod copy_index;5mod 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