Unified · Split
| @@ -12,9 +12,10 @@ pub(crate) mod extension; · 11 unmodified lines | ||
| 12 | 12 | pub mod entry; |
| 13 | 13 | |
| 14 | 14 | mod access { |
| 15 | − use crate::{Entry, State, Version}; | |
| 16 | 15 | use bstr::{BStr, ByteSlice}; |
| 17 | 16 | |
| 17 | + use crate::{Entry, State, Version}; | |
| 18 | + | |
| 18 | 19 | impl State { |
| 19 | 20 | pub fn version(&self) -> Version { |
| 20 | 21 | self.version |
| @@ -64,14 +64,18 @@ pub mod index { · 63 unmodified lines | ||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 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 | 74 | use git_hash::oid; |
| 69 | 75 | use git_index::Entry; |
| 70 | 76 | 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; | |
| 75 | 79 | |
| 76 | 80 | pub fn checkout<Find>( |
| 77 | 81 | entry: &mut Entry, |
| @@ -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 | + | |
| 2 | 5 | use git_object::bstr::ByteSlice; |
| 3 | 6 | use git_odb::FindExt; |
| 4 | 7 | use git_worktree::index; |
| 5 | −use std::fs; | |
| 6 | 8 | |
| 7 | −#[cfg(unix)] | |
| 8 | −use std::os::unix::prelude::MetadataExt; | |
| 9 | +use crate::{dir_structure, fixture_path}; | |
| 9 | 10 | |
| 10 | 11 | #[test] |
| 11 | 12 | fn test_copy_index() -> crate::Result<()> { |
| @@ -1,4 +1,5 @@ | ||
| 1 | 1 | use std::path::{Path, PathBuf}; |
| 2 | + | |
| 2 | 3 | use walkdir::WalkDir; |
| 3 | 4 | |
| 4 | 5 | mod copy_index; |