summaryrefslogtreecommitdiff
path: root/crates/material_theme/src/lib.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-04-22 14:33:36 +0200
committerpml68 <contact@pml68.dev>2025-04-22 14:33:36 +0200
commitc3c05cef555de305729e53cef8b8e660e31eaf27 (patch)
treea8f590846fe9b122361a12607e49e1be91d5bc72 /crates/material_theme/src/lib.rs
parentfeat: use `pane_grid::Controls` for PaneGrid titlebar controls (diff)
downloadiced-builder-c3c05cef555de305729e53cef8b8e660e31eaf27.tar.gz
refactor: apply some clippy suggestions
Diffstat (limited to '')
-rw-r--r--crates/material_theme/src/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/material_theme/src/lib.rs b/crates/material_theme/src/lib.rs
index 416c958..13f13b1 100644
--- a/crates/material_theme/src/lib.rs
+++ b/crates/material_theme/src/lib.rs
@@ -24,6 +24,7 @@ pub mod slider;
#[cfg(feature = "svg")]
pub mod svg;
pub mod text;
+pub mod text_editor;
pub mod text_input;
pub mod toggler;
pub mod utils;
@@ -59,7 +60,7 @@ impl Clone for Theme {
}
fn clone_from(&mut self, source: &Self) {
- self.name = source.name.clone();
+ self.name.clone_from(&source.name);
self.colorscheme = source.colorscheme;
}
}
@@ -142,6 +143,7 @@ pub struct ColorScheme {
pub scrim: Color,
}
+#[allow(clippy::cast_precision_loss)]
macro_rules! from_argb {
($hex:expr) => {{
let hex = $hex as u32;
@@ -155,6 +157,7 @@ macro_rules! from_argb {
}};
}
+#[allow(clippy::cast_precision_loss)]
impl ColorScheme {
const DARK: Self = Self {
primary: Primary {