threadshare: Use downcast_ref() instead of downcast()

This commit is contained in:
Sebastian Dröge 2018-07-12 08:32:38 +03:00
parent 987f78de42
commit ec3e0875a1

View file

@ -839,9 +839,8 @@ impl ProxySrc {
) -> T { ) -> T {
let element = parent let element = parent
.as_ref() .as_ref()
.cloned()
.unwrap() .unwrap()
.downcast::<Element>() .downcast_ref::<Element>()
.unwrap(); .unwrap();
let src = element.get_impl().downcast_ref::<ProxySrc>().unwrap(); let src = element.get_impl().downcast_ref::<ProxySrc>().unwrap();
element.catch_panic(fallback, |element| f(src, element)) element.catch_panic(fallback, |element| f(src, element))