diff --git a/server/base/shutdown.rs b/server/base/shutdown.rs index c744712..1ab157f 100644 --- a/server/base/shutdown.rs +++ b/server/base/shutdown.rs @@ -133,7 +133,7 @@ fn poll_impl(inner: &Inner, waker_i: &mut usize, cx: &mut Context<'_>) -> Poll<( } else { let existing_waker = &mut wakers[*waker_i]; if !new_waker.will_wake(existing_waker) { - *existing_waker = new_waker.clone(); + existing_waker.clone_from(new_waker); } } Poll::Pending diff --git a/server/build.rs b/server/build.rs index 2f6066e..2bc9f12 100644 --- a/server/build.rs +++ b/server/build.rs @@ -113,7 +113,7 @@ fn handle_bundled_ui() -> Result<(), BoxError> { None => { bare_path = path; encoding = FileEncoding::Uncompressed; - if files.get(bare_path).is_some() { + if files.contains_key(bare_path) { continue; // don't replace with suboptimal encoding. } } diff --git a/server/src/cmds/config/cameras.rs b/server/src/cmds/config/cameras.rs index 98ffda1..f0e6298 100644 --- a/server/src/cmds/config/cameras.rs +++ b/server/src/cmds/config/cameras.rs @@ -181,14 +181,16 @@ fn press_edit(siv: &mut Cursive, db: &Arc, id: Option) { ); } let stream_change = &mut change.streams[i]; - stream_change.config.mode = (if stream.record { + (if stream.record { db::json::STREAM_MODE_RECORD } else { "" }) - .to_owned(); + .clone_into(&mut stream_change.config.mode); stream_change.config.url = parse_stream_url(type_, &stream.url)?; - stream_change.config.rtsp_transport = stream.rtsp_transport.to_owned(); + stream + .rtsp_transport + .clone_into(&mut stream_change.config.rtsp_transport); stream_change.sample_file_dir_id = stream.sample_file_dir_id; stream_change.config.flush_if_sec = if stream.flush_if_sec.is_empty() { 0 diff --git a/server/src/h264.rs b/server/src/h264.rs index 0d14741..828799b 100644 --- a/server/src/h264.rs +++ b/server/src/h264.rs @@ -157,7 +157,7 @@ fn parse_extra_data_inner(extradata: &[u8]) -> Result Result