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
cargo-expand
cargo-outdated
cargo-nextest
cargo-deny
cmake

View File

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