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();