style: remove redundant code narration

This commit is contained in:
objz committed 2026-10-01 13:53:12 +02:00
1 parent 495f31778b
commit 783fb76f06
115 files changed
+19 -746

No files matched your search

-4
View File
@@ -1,9 +1,6 @@
// SPDX-FileCopyrightText: 2026 Constantin Bauer
// SPDX-License-Identifier: GPL-3.0-only
// config loading: reads config.toml from the platform config dir, creates defaults if missing.
// everything lands in the SETTINGS static so the rest of the app can just grab it.
use config::{Config as ConfigLoader, ConfigError, File};
use std::fs;
use std::io;
@@ -22,7 +19,6 @@ pub fn get_config_path() -> PathBuf {
.join("rmcl")
}
// seeds the config file from the bundled default on first run
fn ensure_config_exists() -> PathBuf {
let config_path = get_config_path().join("config.toml");
if !config_path.exists() {
-4
View File
@@ -1,9 +1,6 @@
// SPDX-FileCopyrightText: 2026 Constantin Bauer
// SPDX-License-Identifier: GPL-3.0-only
// all the config structs that map to sections in config.toml.
// everything has sane defaults so a blank file (or no file) still works.
use std::{
collections::{BTreeMap, BTreeSet},
fmt,
@@ -250,7 +247,6 @@ impl Default for Paths {
}
}
// expand ~ in paths since toml doesn't do that for us
pub fn resolve_path(raw: &str) -> PathBuf {
if let Some(stripped) = raw.strip_prefix("~/") {
if let Some(home) = dirs_next::home_dir() {
-6
View File
@@ -1,10 +1,6 @@
// SPDX-FileCopyrightText: 2026 Constantin Bauer
// SPDX-License-Identifier: GPL-3.0-only
// theme resolution: loads theme.toml, picks a base theme (builtin or custom file),
// then layers user color overrides on top. supports loading .toml themes from the
// config/theme/ directory or by absolute path.
use std::path::Path;
use std::sync::{Arc, LazyLock, RwLock};
@@ -101,7 +97,6 @@ fn ensure_theme_exists(path: &Path) {
let _ = std::fs::write(path, include_str!("../../assets/theme.toml"));
}
// start from a base theme, then override individual colors if the user specified any
fn resolve_app_theme(config: &ThemeConfig) -> Box<dyn Theme> {
let base = load_base_theme(&config.theme);
@@ -134,7 +129,6 @@ fn resolve_app_theme(config: &ThemeConfig) -> Box<dyn Theme> {
})
}
// tries to find the theme: absolute path > config/theme/<name> > config/theme/<name>.toml > builtin
fn load_base_theme(name: &str) -> Box<dyn Theme> {
let path = if Path::new(name).is_absolute() {
Some(std::path::PathBuf::from(name))