From fc331d97d85a1e49803d8a329af02763231c3bdb Mon Sep 17 00:00:00 2001 From: Daniel Boline Date: Sun, 17 Dec 2023 12:29:39 -0500 Subject: [PATCH] clippy --- movie_collection_http/src/movie_queue_elements.rs | 6 +++--- movie_collection_lib/src/transcode_service.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/movie_collection_http/src/movie_queue_elements.rs b/movie_collection_http/src/movie_queue_elements.rs index 0aaaeaf..06f8999 100644 --- a/movie_collection_http/src/movie_queue_elements.rs +++ b/movie_collection_http/src/movie_queue_elements.rs @@ -1764,7 +1764,7 @@ fn LocalFileElement( } Some(ProcStatus::Finished) => { let mut movie_dirs = - movie_directories(&config).unwrap_or_else(|_| Vec::new()); + movie_directories(config).unwrap_or_else(|_| Vec::new()); if f_key.contains("_s") && f_key.contains("_ep") { movie_dirs.insert(0, "".into()); } @@ -1840,7 +1840,7 @@ pub fn procs_html_body(status: TranscodeStatus) -> String { #[component] fn ProcsHtmlElement(cx: Scope, status: TranscodeStatus) -> Element { - cx.render(procs_html_node(&status)) + cx.render(procs_html_node(status)) } pub fn transcode_get_html_body(status: TranscodeStatus) -> String { @@ -1854,7 +1854,7 @@ pub fn transcode_get_html_body(status: TranscodeStatus) -> String { #[component] fn TranscodeGetHtmlElement(cx: Scope, status: TranscodeStatus) -> Element { - let procs_node = procs_html_node(&status); + let procs_node = procs_html_node(status); cx.render(rsx! { br { button { diff --git a/movie_collection_lib/src/transcode_service.rs b/movie_collection_lib/src/transcode_service.rs index 4b1e7bd..aa05f0e 100644 --- a/movie_collection_lib/src/transcode_service.rs +++ b/movie_collection_lib/src/transcode_service.rs @@ -595,9 +595,9 @@ impl ProcInfo { ] } - fn from_process(p: Process) -> Option { + fn from_process(p: &Process) -> Option { let exe = p.exe().ok()?; - if ACCEPT_PATHS.iter().any(|x| &exe == Path::new(x)) { + if ACCEPT_PATHS.iter().any(|x| exe == Path::new(x)) { let cmdline: Vec<_> = p .cmdline() .ok()? @@ -754,7 +754,7 @@ fn get_procs() -> Result, Error> { let procs = process::all_processes()? .filter_map(|p| { let p = p.ok()?; - ProcInfo::from_process(p) + ProcInfo::from_process(&p) }) .sorted_by_key(|p| p.pid) .collect();