[librsvg/librsvg-2.44] Align::parse_xy() - Take the full ident, not the &str version
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.44] Align::parse_xy() - Take the full ident, not the &str version
- Date: Fri, 21 Sep 2018 17:39:31 +0000 (UTC)
commit d4295499dfed3b07fb5d7a01553e9f3f5fc846d7
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Sep 14 11:52:10 2018 -0500
Align::parse_xy() - Take the full ident, not the &str version
rsvg_internals/src/aspect_ratio.rs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/rsvg_internals/src/aspect_ratio.rs b/rsvg_internals/src/aspect_ratio.rs
index b4c61ebd..9c48951b 100644
--- a/rsvg_internals/src/aspect_ratio.rs
+++ b/rsvg_internals/src/aspect_ratio.rs
@@ -20,8 +20,8 @@
//! [`AspectRatio`]: struct.AspectRatio.html
//! [spec]: https://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
-use cssparser::Parser;
-use error::*;
+use cssparser::{CowRcStr, Parser};
+use error::ValueErrorKind;
use parsers::Parse;
use parsers::ParseError;
use std::ops::Deref;
@@ -153,10 +153,10 @@ impl AspectRatio {
}
impl Align {
- fn parse_xy(s: &str) -> Result<Option<(X, Y)>, ValueErrorKind> {
+ fn parse_xy(ident: &CowRcStr) -> Result<Option<(X, Y)>, ValueErrorKind> {
use self::Align1D::*;
- match s {
+ match ident.as_ref() {
"none" => Ok(None),
"xMinYMin" => Ok(Some((X(Min), Y(Min)))),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]