From 256e3ba587d0aba7f78189b6a18ea5952a1e7c57 Mon Sep 17 00:00:00 2001 From: pml68 Date: Fri, 21 Feb 2025 21:22:52 +0100 Subject: feat: update to Rust 2024 --- src/config.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/config.rs') 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 { 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()?; -- cgit v1.2.3