feat: add cargo-outdated and improve slider precision in app views
Some checks failed
build / checks-matrix (push) Successful in 19m24s
build / codecov (push) Failing after 19m27s
docs / docs (push) Failing after 28m47s
build / checks-build (push) Has been cancelled

This commit is contained in:
uttarayan21
2025-08-22 13:06:16 +05:30
parent 0a5dbaaadc
commit 65560825fa
2 changed files with 11 additions and 10 deletions

View File

@@ -204,6 +204,7 @@
[ [
stableToolchainWithRustAnalyzer stableToolchainWithRustAnalyzer
cargo-expand cargo-expand
cargo-outdated
cargo-nextest cargo-nextest
cargo-deny cargo-deny
cmake cmake

View File

@@ -418,7 +418,7 @@ impl FaceDetectorApp {
} }
} }
fn view(&self) -> Element<Message> { fn view(&self) -> Element<'_, Message> {
let tabs = row![ let tabs = row![
button("Detection") button("Detection")
.on_press(Message::TabChanged(Tab::Detection)) .on_press(Message::TabChanged(Tab::Detection))
@@ -472,7 +472,7 @@ impl FaceDetectorApp {
} }
impl FaceDetectorApp { impl FaceDetectorApp {
fn detection_view(&self) -> Element<Message> { fn detection_view(&self) -> Element<'_, Message> {
let file_section = column![ let file_section = column![
text("Input Image").size(18), text("Input Image").size(18),
row![ row![
@@ -581,14 +581,14 @@ impl FaceDetectorApp {
text("Detection Parameters").size(18), text("Detection Parameters").size(18),
row![ row![
text("Threshold:"), text("Threshold:"),
slider(0.1..=1.0, self.threshold, Message::ThresholdChanged), slider(0.1..=1.0, self.threshold, Message::ThresholdChanged).step(0.01),
text(format!("{:.2}", self.threshold)), text(format!("{:.2}", self.threshold)),
] ]
.spacing(10) .spacing(10)
.align_y(Alignment::Center), .align_y(Alignment::Center),
row![ row![
text("NMS Threshold:"), text("NMS Threshold:"),
slider(0.1..=1.0, self.nms_threshold, Message::NmsThresholdChanged), slider(0.1..=1.0, self.nms_threshold, Message::NmsThresholdChanged).step(0.01),
text(format!("{:.2}", self.nms_threshold)), text(format!("{:.2}", self.nms_threshold)),
] ]
.spacing(10) .spacing(10)
@@ -633,7 +633,7 @@ impl FaceDetectorApp {
.into() .into()
} }
fn comparison_view(&self) -> Element<Message> { fn comparison_view(&self) -> Element<'_, Message> {
let file_section = column![ let file_section = column![
text("Image Comparison").size(18), text("Image Comparison").size(18),
row![ row![
@@ -742,14 +742,14 @@ impl FaceDetectorApp {
text("Comparison Parameters").size(18), text("Comparison Parameters").size(18),
row![ row![
text("Threshold:"), text("Threshold:"),
slider(0.1..=1.0, self.threshold, Message::ThresholdChanged), slider(0.1..=1.0, self.threshold, Message::ThresholdChanged).step(0.01),
text(format!("{:.2}", self.threshold)), text(format!("{:.2}", self.threshold)),
] ]
.spacing(10) .spacing(10)
.align_y(Alignment::Center), .align_y(Alignment::Center),
row![ row![
text("NMS Threshold:"), text("NMS Threshold:"),
slider(0.1..=1.0, self.nms_threshold, Message::NmsThresholdChanged), slider(0.1..=1.0, self.nms_threshold, Message::NmsThresholdChanged).step(0.01),
text(format!("{:.2}", self.nms_threshold)), text(format!("{:.2}", self.nms_threshold)),
] ]
.spacing(10) .spacing(10)
@@ -822,7 +822,7 @@ impl FaceDetectorApp {
.into() .into()
} }
fn settings_view(&self) -> Element<Message> { fn settings_view(&self) -> Element<'_, Message> {
let executor_options = vec![ let executor_options = vec![
ExecutorType::MnnCpu, ExecutorType::MnnCpu,
ExecutorType::MnnMetal, ExecutorType::MnnMetal,
@@ -846,14 +846,14 @@ impl FaceDetectorApp {
text("Detection Thresholds").size(18), text("Detection Thresholds").size(18),
row![ row![
text("Detection Threshold:"), text("Detection Threshold:"),
slider(0.1..=1.0, self.threshold, Message::ThresholdChanged), slider(0.1..=1.0, self.threshold, Message::ThresholdChanged).step(0.01),
text(format!("{:.2}", self.threshold)), text(format!("{:.2}", self.threshold)),
] ]
.spacing(10) .spacing(10)
.align_y(Alignment::Center), .align_y(Alignment::Center),
row![ row![
text("NMS Threshold:"), text("NMS Threshold:"),
slider(0.1..=1.0, self.nms_threshold, Message::NmsThresholdChanged), slider(0.1..=1.0, self.nms_threshold, Message::NmsThresholdChanged).step(0.01),
text(format!("{:.2}", self.nms_threshold)), text(format!("{:.2}", self.nms_threshold)),
] ]
.spacing(10) .spacing(10)