Avoid extra smol::channel
when iterating through snapshot paths
This commit is contained in:
parent
6a0cca7178
commit
561123d6de
2 changed files with 71 additions and 60 deletions
|
@ -554,10 +554,6 @@ impl LocalWorktree {
|
|||
Ok((tree, scan_states_tx))
|
||||
}
|
||||
|
||||
pub fn abs_path(&self) -> &Arc<Path> {
|
||||
&self.abs_path
|
||||
}
|
||||
|
||||
pub fn contains_abs_path(&self, path: &Path) -> bool {
|
||||
path.starts_with(&self.abs_path)
|
||||
}
|
||||
|
@ -1017,6 +1013,10 @@ impl Snapshot {
|
|||
}
|
||||
|
||||
impl LocalSnapshot {
|
||||
pub fn abs_path(&self) -> &Arc<Path> {
|
||||
&self.abs_path
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn to_proto(
|
||||
&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue