aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--niri-config/src/lib.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs
index 880a08e9..e20b0f49 100644
--- a/niri-config/src/lib.rs
+++ b/niri-config/src/lib.rs
@@ -3,7 +3,7 @@ extern crate tracing;
use std::collections::HashSet;
use std::ffi::OsStr;
-use std::ops::Mul;
+use std::ops::{Mul, MulAssign};
use std::path::{Path, PathBuf};
use std::str::FromStr;
use std::time::Duration;
@@ -822,6 +822,12 @@ impl Mul<f32> for Color {
}
}
+impl MulAssign<f32> for Color {
+ fn mul_assign(&mut self, rhs: f32) {
+ self.a *= rhs;
+ }
+}
+
#[derive(knuffel::Decode, Debug, PartialEq)]
pub struct Cursor {
#[knuffel(child, unwrap(argument), default = String::from("default"))]