mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
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
2b0674b7cb
commit
918b34fb7a
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