style: Use references in the shapes code.

It doesn't make much sense to return const UniquePtr<Foo>& for something that
can't be null, it's just confusing.

Also make more stuff actually const.

Differential Revision: https://phabricator.services.mozilla.com/D10647
This commit is contained in:
Emilio Cobos Álvarez 2018-11-02 18:19:06 +00:00
parent 52c3ba00b3
commit a7b5ba14c0
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -718,7 +718,7 @@ pub mod basic_shape {
match other.mType {
StyleShapeSourceType::URL => unsafe {
let shape_image = &*other.__bindgen_anon_1.mShapeImage.as_ref().mPtr;
let other_url = RefPtr::new(*shape_image.__bindgen_anon_1.mURLValue.as_ref());
let other_url = RefPtr::new(*shape_image.__bindgen_anon_1.mURLValue.as_ref() as *mut _);
let url = ComputedUrl::from_url_value(other_url);
ShapeSource::ImageOrUrl(url)
},