fix clippy

This commit is contained in:
Evan Almloff committed 2023-08-08 13:43:57 -07:00
1 parent 4ee4cf23d3
commit 24c626b306
9 files changed
+30 -27

No files matched your search

+7 -1
View File
@@ -1,6 +1,7 @@
use dioxus::{events::MouseData, prelude::*};
use dioxus_core::Event;
use std::convert::TryInto;
use std::fmt::Write;
use std::rc::Rc;
fn main() {
@@ -9,7 +10,12 @@ fn main() {
fn app(cx: Scope) -> Element {
fn to_str(c: &[i32; 3]) -> String {
"#".to_string() + &c.iter().map(|c| format!("{c:02X?}")).collect::<String>()
let mut result = String::new();
result += "#";
for c in c.iter() {
write!(string, "{c:02X?}").unwrap();
}
result
}
fn get_brightness(m: &Rc<MouseData>) -> i32 {