diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-02-10 13:29:00 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-02-10 07:29:33 -0800 |
| commit | fde627d955bd0d7b1211587a0fc08442bf00e079 (patch) | |
| tree | bb93e4d62776229f198db5d12739364bdda0f63d | |
| parent | 6942ecc13a40867850fc26429da21603647e8026 (diff) | |
| download | niri-fde627d955bd0d7b1211587a0fc08442bf00e079.tar.gz niri-fde627d955bd0d7b1211587a0fc08442bf00e079.tar.bz2 niri-fde627d955bd0d7b1211587a0fc08442bf00e079.zip | |
Implement MulAssign<f32> for Color
| -rw-r--r-- | niri-config/src/lib.rs | 8 |
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"))] |
