diff options
| author | Polesznyák Márk <contact@pml68.dev> | 2026-01-04 02:40:38 +0100 |
|---|---|---|
| committer | Polesznyák Márk <contact@pml68.dev> | 2026-01-04 02:40:38 +0100 |
| commit | 534193b3ed61e62b271120d2d2f5e85988752136 (patch) | |
| tree | 21cd492356d1c10ea86bf0fc958322634a632d6c /src/types/project.rs | |
| parent | refactor: remove release-opt profile (diff) | |
| download | iced-builder-534193b3ed61e62b271120d2d2f5e85988752136.tar.gz | |
chore: replace tokio with smol, disable unneeded iced feature flags
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() |
