Make ServoUrl::as_url return a &Url

This commit is contained in:
Anthony Ramine 2017-03-23 15:37:32 +01:00
parent fb2c9e7bf5
commit bba0be13dd
7 changed files with 19 additions and 19 deletions

View file

@ -53,8 +53,8 @@ impl ServoUrl {
Some(Arc::try_unwrap(self.0).unwrap_or_else(|s| (*s).clone()))
}
pub fn as_url(&self) -> Option<&Arc<Url>> {
Some(&self.0)
pub fn as_url(&self) -> &Url {
&self.0
}
pub fn parse(input: &str) -> Result<Self, url::ParseError> {