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 {
let element = parent
.as_ref()
.cloned()
.unwrap()
.downcast::<Element>()
.downcast_ref::<Element>()
.unwrap();
let src = element.get_impl().downcast_ref::<ProxySrc>().unwrap();
element.catch_panic(fallback, |element| f(src, element))