diff options
| author | pml68 <contact@pml68.dev> | 2025-02-21 21:22:52 +0100 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-02-21 21:25:38 +0100 |
| commit | 256e3ba587d0aba7f78189b6a18ea5952a1e7c57 (patch) | |
| tree | b54978347382ae182a87703644fc3cfaf103292a /src/config.rs | |
| parent | Merge pull request #6 from pml68/feat/0.14 (diff) | |
| download | iced-builder-256e3ba587d0aba7f78189b6a18ea5952a1e7c57.tar.gz | |
feat: update to Rust 2024
Diffstat (limited to '')
| -rw-r--r-- | src/config.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config.rs b/src/config.rs index 5569aae..975437f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,11 +1,11 @@ use std::path::PathBuf; use serde::Deserialize; -use tokio_stream::wrappers::ReadDirStream; use tokio_stream::StreamExt; +use tokio_stream::wrappers::ReadDirStream; -use crate::theme::{theme_from_str, theme_index, Appearance, Theme}; -use crate::{environment, Error}; +use crate::theme::{Appearance, Theme, theme_from_str, theme_index}; +use crate::{Error, environment}; #[derive(Debug, Clone, Default)] pub struct Config { @@ -75,7 +75,7 @@ impl Config { pub async fn load_theme(theme_name: String) -> Result<Appearance, Error> { use tokio::fs; - let read_entry = |entry: fs::DirEntry| async move { + let read_entry = async move |entry: fs::DirEntry| { let content = fs::read_to_string(entry.path()).await.ok()?; let theme: Theme = toml::from_str(content.as_ref()).ok()?; |
