From d7f79fa2e9e1f79954ba2fb8edd3cd1fc819a30c Mon Sep 17 00:00:00 2001 From: ShootingStarDragons Date: Thu, 28 Sep 2023 20:08:22 +0800 Subject: [PATCH] chore: cargo clippy --- src/settings.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/settings.rs b/src/settings.rs index f61c5ed..35f2792 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -27,11 +27,11 @@ pub struct AccentColor { pub color: [f64; 3], } -impl Into for AccentColor { - fn into(self) -> OwnedValue { +impl From for OwnedValue { + fn from(val: AccentColor) -> Self { let arraysignature = Signature::try_from("d").unwrap(); let mut array = Array::new(arraysignature); - for col in self.color { + for col in val.color { array.append(col.into()).unwrap(); } OwnedValue::from(array)