Skip to content

Commit

Permalink
style: Simplify ImageValue.
Browse files Browse the repository at this point in the history
Bug: 1452987
Reviewed-by: heycam
MozReview-Commit-ID: 5LRaaEPSSdY
  • Loading branch information
emilio committed Apr 11, 2018
1 parent 9a900ef commit 1d8e64c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions components/style/gecko/url.rs
Expand Up @@ -56,14 +56,10 @@ impl CssUrl {

/// Convert from URLValueData to SpecifiedUrl.
unsafe fn from_url_value_data(url: &URLValueData) -> Result<Self, ()> {
let arc_type =
&url.mString as *const _ as *const RawOffsetArc<String>;
Ok(CssUrl {
serialization: if url.mUsingRustString {
let arc_type =
url.mStrings.mRustString.as_ref() as *const _ as *const RawOffsetArc<String>;
Arc::from_raw_offset((*arc_type).clone())
} else {
Arc::new(url.mStrings.mString.as_ref().to_string())
},
serialization: Arc::from_raw_offset((*arc_type).clone()),
extra_data: url.mExtraData.to_safe(),
})
}
Expand Down

0 comments on commit 1d8e64c

Please sign in to comment.