clippy
This commit is contained in:
parent
a9a23251b7
commit
09372534cd
7 changed files with 2 additions and 21 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -5936,7 +5936,6 @@ dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"cocoa 0.26.0",
|
"cocoa 0.26.0",
|
||||||
"collections",
|
"collections",
|
||||||
"dirs 4.0.0",
|
|
||||||
"fsevent",
|
"fsevent",
|
||||||
"futures 0.3.31",
|
"futures 0.3.31",
|
||||||
"git",
|
"git",
|
||||||
|
|
|
@ -16,7 +16,6 @@ anyhow.workspace = true
|
||||||
async-tar.workspace = true
|
async-tar.workspace = true
|
||||||
async-trait.workspace = true
|
async-trait.workspace = true
|
||||||
collections.workspace = true
|
collections.workspace = true
|
||||||
dirs.workspace = true
|
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
git.workspace = true
|
git.workspace = true
|
||||||
gpui.workspace = true
|
gpui.workspace = true
|
||||||
|
|
|
@ -131,7 +131,6 @@ pub trait Fs: Send + Sync {
|
||||||
Arc<dyn Watcher>,
|
Arc<dyn Watcher>,
|
||||||
);
|
);
|
||||||
|
|
||||||
// fn home_dir(&self) -> Option<PathBuf>;
|
|
||||||
fn open_repo(&self, abs_dot_git: &Path) -> Option<Arc<dyn GitRepository>>;
|
fn open_repo(&self, abs_dot_git: &Path) -> Option<Arc<dyn GitRepository>>;
|
||||||
fn git_init(&self, abs_work_directory: &Path, fallback_branch_name: String) -> Result<()>;
|
fn git_init(&self, abs_work_directory: &Path, fallback_branch_name: String) -> Result<()>;
|
||||||
fn is_fake(&self) -> bool;
|
fn is_fake(&self) -> bool;
|
||||||
|
@ -879,10 +878,6 @@ impl Fs for RealFs {
|
||||||
temp_dir.close()?;
|
temp_dir.close()?;
|
||||||
case_sensitive
|
case_sensitive
|
||||||
}
|
}
|
||||||
|
|
||||||
// fn home_dir(&self) -> Option<PathBuf> {
|
|
||||||
// Some(paths::home_dir().clone())
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(any(target_os = "linux", target_os = "freebsd")))]
|
#[cfg(not(any(target_os = "linux", target_os = "freebsd")))]
|
||||||
|
@ -917,7 +912,6 @@ struct FakeFsState {
|
||||||
read_dir_call_count: usize,
|
read_dir_call_count: usize,
|
||||||
path_write_counts: std::collections::HashMap<PathBuf, usize>,
|
path_write_counts: std::collections::HashMap<PathBuf, usize>,
|
||||||
moves: std::collections::HashMap<u64, PathBuf>,
|
moves: std::collections::HashMap<u64, PathBuf>,
|
||||||
// home_dir: Option<PathBuf>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(test, feature = "test-support"))]
|
#[cfg(any(test, feature = "test-support"))]
|
||||||
|
@ -1104,7 +1098,6 @@ impl FakeFs {
|
||||||
metadata_call_count: 0,
|
metadata_call_count: 0,
|
||||||
path_write_counts: Default::default(),
|
path_write_counts: Default::default(),
|
||||||
moves: Default::default(),
|
moves: Default::default(),
|
||||||
// home_dir: None,
|
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2360,10 +2353,6 @@ impl Fs for FakeFs {
|
||||||
fn as_fake(&self) -> Arc<FakeFs> {
|
fn as_fake(&self) -> Arc<FakeFs> {
|
||||||
self.this.upgrade().unwrap()
|
self.this.upgrade().unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
// fn home_dir(&self) -> Option<PathBuf> {
|
|
||||||
// self.state.lock().home_dir.clone()
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn chunks(rope: &Rope, line_ending: LineEnding) -> impl Iterator<Item = &str> {
|
fn chunks(rope: &Rope, line_ending: LineEnding) -> impl Iterator<Item = &str> {
|
||||||
|
|
|
@ -517,6 +517,6 @@ pub fn global_gitignore_path() -> Option<PathBuf> {
|
||||||
pub fn global_gitignore_path() -> Option<PathBuf> {
|
pub fn global_gitignore_path() -> Option<PathBuf> {
|
||||||
static GLOBAL_GITIGNORE_PATH: OnceLock<Option<PathBuf>> = OnceLock::new();
|
static GLOBAL_GITIGNORE_PATH: OnceLock<Option<PathBuf>> = OnceLock::new();
|
||||||
GLOBAL_GITIGNORE_PATH
|
GLOBAL_GITIGNORE_PATH
|
||||||
.get_or_init(|| ::ignore::gitignore::gitconfig_excludes_path())
|
.get_or_init(::ignore::gitignore::gitconfig_excludes_path)
|
||||||
.clone()
|
.clone()
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,6 @@ use std::{ffi::OsStr, path::Path, sync::Arc};
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct IgnoreStack {
|
pub struct IgnoreStack {
|
||||||
/// Rooted globs (like /foo or foo/bar) in the global core.excludesFile are matched against the nearest containing repository root,
|
|
||||||
/// so we
|
|
||||||
pub repo_root: Option<Arc<Path>>,
|
pub repo_root: Option<Arc<Path>>,
|
||||||
pub top: Arc<IgnoreStackEntry>,
|
pub top: Arc<IgnoreStackEntry>,
|
||||||
}
|
}
|
||||||
|
@ -12,7 +10,6 @@ pub struct IgnoreStack {
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum IgnoreStackEntry {
|
pub enum IgnoreStackEntry {
|
||||||
None,
|
None,
|
||||||
/// core.excludesFile
|
|
||||||
Global {
|
Global {
|
||||||
ignore: Arc<Gitignore>,
|
ignore: Arc<Gitignore>,
|
||||||
},
|
},
|
||||||
|
|
|
@ -4180,7 +4180,6 @@ impl BackgroundScanner {
|
||||||
let (prev_snapshot, ignore_stack, abs_path) = {
|
let (prev_snapshot, ignore_stack, abs_path) = {
|
||||||
let mut state = self.state.lock();
|
let mut state = self.state.lock();
|
||||||
state.snapshot.global_gitignore = ignore;
|
state.snapshot.global_gitignore = ignore;
|
||||||
// FIXME is_dir (do we care?)
|
|
||||||
let abs_path = state.snapshot.abs_path().clone();
|
let abs_path = state.snapshot.abs_path().clone();
|
||||||
let ignore_stack =
|
let ignore_stack =
|
||||||
state
|
state
|
||||||
|
@ -4803,7 +4802,6 @@ impl BackgroundScanner {
|
||||||
.strip_prefix(snapshot.abs_path.as_path())
|
.strip_prefix(snapshot.abs_path.as_path())
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// FIXME understand the bug that causes .git to not have a snapshot entry here in the test
|
|
||||||
if let Ok(Some(metadata)) = smol::block_on(self.fs.metadata(&job.abs_path.join(*DOT_GIT)))
|
if let Ok(Some(metadata)) = smol::block_on(self.fs.metadata(&job.abs_path.join(*DOT_GIT)))
|
||||||
&& metadata.is_dir
|
&& metadata.is_dir
|
||||||
{
|
{
|
||||||
|
|
|
@ -2127,8 +2127,7 @@ async fn test_global_gitignore(executor: BackgroundExecutor, cx: &mut TestAppCon
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// FIXME statuses are updated when .git added/removed
|
// Statuses are updated when .git added/removed
|
||||||
|
|
||||||
fs.remove_dir(
|
fs.remove_dir(
|
||||||
Path::new(path!("/home/zed/project/subrepo/.git")),
|
Path::new(path!("/home/zed/project/subrepo/.git")),
|
||||||
RemoveOptions {
|
RemoveOptions {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue