refactor(cargo): upgrade to rust edition 2024

This commit is contained in:
LGUG2Z
2025-02-27 17:12:49 -08:00
parent ca893140f5
commit c07689de90
63 changed files with 822 additions and 691 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
name = "komorebi-gui"
version = "0.1.35"
edition = "2021"
edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+7 -6
View File
@@ -1,9 +1,9 @@
#![warn(clippy::all)]
use eframe::egui;
use eframe::egui::color_picker::Alpha;
use eframe::egui::Color32;
use eframe::egui::ViewportBuilder;
use eframe::egui::color_picker::Alpha;
use komorebi_client::BorderStyle;
use komorebi_client::Colour;
use komorebi_client::DefaultLayout;
@@ -101,7 +101,7 @@ impl From<&komorebi_client::Workspace> for WorkspaceConfig {
let name = value
.name()
.to_owned()
.unwrap_or_else(|| random_word::gen(random_word::Lang::En).to_string());
.unwrap_or_else(|| random_word::r#gen(random_word::Lang::En).to_string());
Self {
layout,
@@ -248,10 +248,11 @@ impl eframe::App for KomorebiGui {
ui.collapsing("Window Rules", |ui| {
let window = Window::from(self.debug_hwnd);
let label = if let (Ok(title), Ok(exe)) = (window.title(), window.exe()) {
format!("{title} ({exe})")
} else {
String::from("Select a Window")
let label = match (window.title(), window.exe()) {
(Ok(title), Ok(exe)) => {
format!("{title} ({exe})")
}
_ => String::from("Select a Window"),
};
if ui.button("Refresh Windows").clicked() {