forked from mirrors/gstreamer-rs
Use Arc::clone(&val) instead of val.clone() to make it more explicit that only the Arc cloned here
This commit is contained in:
parent
34f70ee0d7
commit
8c697b3a27
2 changed files with 2 additions and 2 deletions
|
@ -149,7 +149,7 @@ mod futures {
|
|||
pub fn new(bus: &Bus) -> Self {
|
||||
skip_assert_initialized!();
|
||||
let task = Arc::new(Mutex::new(None));
|
||||
let task_clone = task.clone();
|
||||
let task_clone = Arc::clone(&task);
|
||||
|
||||
bus.set_sync_handler(move |_, _| {
|
||||
let mut task = task_clone.lock().unwrap();
|
||||
|
|
|
@ -355,7 +355,7 @@ unsafe extern "C" fn filter_boxed_ref<T: 'static>(boxed: gpointer) -> gpointer {
|
|||
callback_guard!();
|
||||
|
||||
let boxed = Arc::from_raw(boxed as *const (Box<Fn(T) -> bool + Send + Sync + 'static>));
|
||||
let copy = boxed.clone();
|
||||
let copy = Arc::clone(&boxed);
|
||||
|
||||
// Forget it and keep it alive, we will still need it later
|
||||
let _ = Arc::into_raw(boxed);
|
||||
|
|
Loading…
Reference in a new issue