style: Use RefPtr::new instead of RefPtr::from_ptr_ref + clone.

Bug: 1461858
Reviewed-by: emilio
This commit is contained in:
Xidorn Quan 2018-05-16 22:21:57 +10:00 committed by Emilio Cobos Álvarez
parent ecb2ec63de
commit 514aba51ad
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 6 additions and 6 deletions

View file

@ -679,8 +679,8 @@ pub mod basic_shape {
match other.mType {
StyleShapeSourceType::URL => unsafe {
let shape_image = &*other.mShapeImage.mPtr;
let other_url = RefPtr::from_ptr_ref(shape_image.__bindgen_anon_1.mURLValue.as_ref());
let url = ComputedUrl::from_url_value(other_url.clone());
let other_url = RefPtr::new(*shape_image.__bindgen_anon_1.mURLValue.as_ref());
let url = ComputedUrl::from_url_value(other_url);
ShapeSource::ImageOrUrl(url)
},
StyleShapeSourceType::Image => {