diff options
Diffstat (limited to 'src/types/project.rs')
| -rw-r--r-- | src/types/project.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/types/project.rs b/src/types/project.rs index aac9bca..a9c4430 100644 --- a/src/types/project.rs +++ b/src/types/project.rs @@ -1,5 +1,7 @@ use std::path::{Path, PathBuf}; +use smol::fs; + extern crate fxhash; use iced::theme::{Base, Mode, Theme}; use rust_format::{Formatter, PostProcess, PrettyPlease}; @@ -39,7 +41,7 @@ impl Project { } pub async fn from_path(path: PathBuf) -> Result<(PathBuf, Self), Error> { - let contents = tokio::fs::read_to_string(&path).await?; + let contents = fs::read_to_string(&path).await?; let project: Self = serde_json::from_str(&contents)?; Ok((path, project)) @@ -62,8 +64,6 @@ impl Project { self, path: Option<PathBuf>, ) -> Result<PathBuf, Error> { - use tokio::fs; - let path = if let Some(p) = path { if let Some(parent) = p.parent() && !parent.exists() |
