mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-10 12:19:28 +00:00
remove dbg
This commit is contained in:
parent
b46afa7d2b
commit
c39368ff76
2 changed files with 2 additions and 12 deletions
|
@ -496,23 +496,16 @@ impl Fs for RealFs {
|
|||
}
|
||||
|
||||
async fn save(&self, path: &Path, text: &Rope, line_ending: LineEnding) -> Result<()> {
|
||||
dbg!("saving to", path);
|
||||
let buffer_size = text.summary().len.min(10 * 1024);
|
||||
if let Some(path) = path.parent() {
|
||||
dbg!(path);
|
||||
self.create_dir(path).await.inspect_err(|e| {
|
||||
dbg!(e);
|
||||
})?;
|
||||
self.create_dir(path).await?
|
||||
}
|
||||
let file = smol::fs::File::create(path).await.inspect_err(|e| {
|
||||
dbg!(e);
|
||||
})?;
|
||||
let file = smol::fs::File::create(path).await?;
|
||||
let mut writer = smol::io::BufWriter::with_capacity(buffer_size, file);
|
||||
for chunk in chunks(text, line_ending) {
|
||||
writer.write_all(chunk.as_bytes()).await?;
|
||||
}
|
||||
writer.flush().await?;
|
||||
dbg!("saved to", path);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -1506,12 +1506,9 @@ impl LocalWorktree {
|
|||
let path = path.into();
|
||||
let fs = self.fs.clone();
|
||||
let is_private = self.is_path_private(&path);
|
||||
dbg!(&path);
|
||||
let Ok(abs_path) = self.absolutize(&path) else {
|
||||
dbg!("oh no");
|
||||
return Task::ready(Err(anyhow!("invalid path {path:?}")));
|
||||
};
|
||||
dbg!(&abs_path);
|
||||
|
||||
let write = cx.background_executor().spawn({
|
||||
let fs = fs.clone();
|
||||
|
|
Loading…
Reference in a new issue