Skip to content

Commit 3c0f261

Browse files
committed
fix warnings
1 parent d886e90 commit 3c0f261

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/main.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
use std::fmt::Display;
21
use std::fs::OpenOptions;
3-
use std::io::{Read, Write};
4-
use std::ops::{Deref, DerefMut};
2+
use std::io::Write;
53
use std::process::exit;
64
use std::str::FromStr;
75
use std::time::Duration;
86

97
use clap::Parser;
10-
use eyre::{Context, ContextCompat, ErrReport, OptionExt};
8+
use eyre::ErrReport;
119
use opencv::core::{Mat, Point, Rect, Scalar};
1210
use opencv::highgui;
1311
use opencv::imgproc::HersheyFonts;
@@ -164,7 +162,7 @@ impl FromStr for Output {
164162
return Ok(Output::None);
165163
}
166164
if output.starts_with("file://") {
167-
let path = output.clone().replace("file://", "");
165+
let path = output.replace("file://", "");
168166
Ok(Output::FILE(path))
169167
} else if output.starts_with("http://") {
170168
let client = get_client()?;

src/runner/runner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::str::FromStr;
2-
31
use ndarray::{s, Axis};
42
use opencv::core::{Mat, MatTraitConst, MatTraitConstManual, Size, CV_32F};
53
use opencv::prelude::VideoCaptureTrait;
@@ -13,6 +11,7 @@ use serde::{Deserialize, Serialize};
1311
use uuid::Uuid;
1412

1513
pub struct ModelRunner {
14+
#[allow(unused)]
1615
pub id: String,
1716
pub session: Session,
1817
pub config: ModelRunConfig,
@@ -120,6 +119,7 @@ impl ModelRunner {
120119
}
121120

122121
///Stop runner
122+
#[allow(unused)]
123123
pub fn stop(&mut self) -> eyre::Result<()> {
124124
self.close_flag = true;
125125
self.session.end_profiling()?;

0 commit comments

Comments
 (0)