[librsvg/librsvg-2.42] rustfmt - and update its configuration
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.42] rustfmt - and update its configuration
- Date: Fri, 1 Jun 2018 17:16:02 +0000 (UTC)
commit 13e244d01b7c9f6391e7180f519a3d1cf74dce5a
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Jun 1 10:59:58 2018 -0500
rustfmt - and update its configuration
.rustfmt.toml | 5 +--
rsvg_internals/src/aspect_ratio.rs | 11 +++---
rsvg_internals/src/bbox.rs | 3 +-
rsvg_internals/src/color.rs | 6 ++-
rsvg_internals/src/coord_units.rs | 2 +-
rsvg_internals/src/gradient.rs | 4 +-
rsvg_internals/src/length.rs | 2 +-
rsvg_internals/src/marker.rs | 76 +++++++++++++++++++-------------------
rsvg_internals/src/node.rs | 2 +-
rsvg_internals/src/paint_server.rs | 5 +--
rsvg_internals/src/path_parser.rs | 19 ++++++----
rsvg_internals/src/pattern.rs | 14 +++++--
rsvg_internals/src/shapes.rs | 40 ++++++++++++--------
rsvg_internals/src/stop.rs | 4 +-
rsvg_internals/src/structure.rs | 34 ++++++++++-------
rsvg_internals/src/transform.rs | 36 ++++++++++--------
rsvg_internals/src/viewbox.rs | 2 +-
17 files changed, 147 insertions(+), 118 deletions(-)
---
diff --git a/.rustfmt.toml b/.rustfmt.toml
index 74c46811..9d6f9fdd 100644
--- a/.rustfmt.toml
+++ b/.rustfmt.toml
@@ -1,6 +1,5 @@
unstable_features = true
indent_style = "Block"
-verbose = false
max_width = 100
comment_width = 100
wrap_comments = true
@@ -12,8 +11,6 @@ condense_wildcard_suffixes = false
format_strings = true
normalize_comments = true
reorder_imports = true
-reorder_imported_names = true
-reorder_imports_in_group = true
use_field_init_shorthand = true
imports_indent = "Block"
-imports_layout = "HorizontalVertical"
\ No newline at end of file
+imports_layout = "HorizontalVertical"
diff --git a/rsvg_internals/src/aspect_ratio.rs b/rsvg_internals/src/aspect_ratio.rs
index ec601f8e..e8b076e5 100644
--- a/rsvg_internals/src/aspect_ratio.rs
+++ b/rsvg_internals/src/aspect_ratio.rs
@@ -160,11 +160,12 @@ impl AspectRatio {
.and_then(|ident| Align::parse_xy(ident))
})?;
- let fit = p.try(|p| {
- p.expect_ident()
- .map_err(|_| ())
- .and_then(|ident| FitMode::parse(ident))
- }).unwrap_or(FitMode::default());
+ let fit =
+ p.try(|p| {
+ p.expect_ident()
+ .map_err(|_| ())
+ .and_then(|ident| FitMode::parse(ident))
+ }).unwrap_or(FitMode::default());
p.expect_exhausted().map_err(|_| ())?;
diff --git a/rsvg_internals/src/bbox.rs b/rsvg_internals/src/bbox.rs
index fe63b0f7..e36e7bd7 100644
--- a/rsvg_internals/src/bbox.rs
+++ b/rsvg_internals/src/bbox.rs
@@ -35,7 +35,8 @@ impl RsvgBbox {
}
pub fn is_empty(&self) -> bool {
- from_glib(self.virgin) || self.rect.width.approx_eq_cairo(&0.0)
+ from_glib(self.virgin)
+ || self.rect.width.approx_eq_cairo(&0.0)
|| self.rect.height.approx_eq_cairo(&0.0)
}
diff --git a/rsvg_internals/src/color.rs b/rsvg_internals/src/color.rs
index bbed55fe..a2fc13fa 100644
--- a/rsvg_internals/src/color.rs
+++ b/rsvg_internals/src/color.rs
@@ -165,8 +165,10 @@ impl From<Result<Color, AttributeError>> for ColorSpec {
Ok(Color::RGBA(rgba)) => ColorSpec {
kind: ColorKind::ARGB,
- argb: (u32::from(rgba.alpha) << 24 | u32::from(rgba.red) << 16
- | u32::from(rgba.green) << 8 | u32::from(rgba.blue)),
+ argb: (u32::from(rgba.alpha) << 24
+ | u32::from(rgba.red) << 16
+ | u32::from(rgba.green) << 8
+ | u32::from(rgba.blue)),
},
_ => ColorSpec {
diff --git a/rsvg_internals/src/coord_units.rs b/rsvg_internals/src/coord_units.rs
index 0877ee58..650b209a 100644
--- a/rsvg_internals/src/coord_units.rs
+++ b/rsvg_internals/src/coord_units.rs
@@ -38,7 +38,7 @@ impl Parse for CoordUnits {
/// specified `$default` value.
#[macro_export]
macro_rules! coord_units {
- ($name: ident, $default: expr) => {
+ ($name:ident, $default:expr) => {
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
struct $name(CoordUnits);
diff --git a/rsvg_internals/src/gradient.rs b/rsvg_internals/src/gradient.rs
index fb7b4981..21db32fe 100644
--- a/rsvg_internals/src/gradient.rs
+++ b/rsvg_internals/src/gradient.rs
@@ -117,7 +117,9 @@ impl GradientCommon {
}
fn is_resolved(&self) -> bool {
- self.units.is_some() && self.affine.is_some() && self.spread.is_some()
+ self.units.is_some()
+ && self.affine.is_some()
+ && self.spread.is_some()
&& self.stops.is_some()
}
diff --git a/rsvg_internals/src/length.rs b/rsvg_internals/src/length.rs
index 50a38fa7..39c738d3 100644
--- a/rsvg_internals/src/length.rs
+++ b/rsvg_internals/src/length.rs
@@ -588,7 +588,7 @@ mod tests {
#[test]
fn parses_named_sizes() {
let names = vec![
- "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"
+ "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large",
];
let mut previous_value: Option<f64> = None;
diff --git a/rsvg_internals/src/marker.rs b/rsvg_internals/src/marker.rs
index 05d39f34..92523824 100644
--- a/rsvg_internals/src/marker.rs
+++ b/rsvg_internals/src/marker.rs
@@ -15,8 +15,8 @@ use handle::RsvgHandle;
use length::{LengthDir, RsvgLength};
use node::*;
use parsers;
-use parsers::{parse, Parse};
use parsers::ParseError;
+use parsers::{parse, Parse};
use path_builder::*;
use property_bag::PropertyBag;
use state;
@@ -207,7 +207,8 @@ impl NodeTrait for NodeMarker {
.set(parse("refX", value, LengthDir::Horizontal, None)?)
}
- Attribute::RefY => self.ref_y
+ Attribute::RefY => self
+ .ref_y
.set(parse("refY", value, LengthDir::Vertical, None)?),
Attribute::MarkerWidth => self.width.set(parse(
@@ -829,10 +830,12 @@ mod parser_tests {
#[test]
fn parsing_invalid_marker_units_yields_error() {
- assert!(is_parse_error(&MarkerUnits::parse("", ()).map_err(|e| AttributeError::from(e))));
- assert!(
- is_parse_error(&MarkerUnits::parse("foo", ()).map_err(|e| AttributeError::from(e)))
- );
+ assert!(is_parse_error(
+ &MarkerUnits::parse("", ()).map_err(|e| AttributeError::from(e))
+ ));
+ assert!(is_parse_error(
+ &MarkerUnits::parse("foo", ()).map_err(|e| AttributeError::from(e))
+ ));
}
#[test]
@@ -849,13 +852,15 @@ mod parser_tests {
#[test]
fn parsing_invalid_marker_orient_yields_error() {
- assert!(is_parse_error(&MarkerOrient::parse("", ()).map_err(|e| AttributeError::from(e))));
- assert!(
- is_parse_error(&MarkerOrient::parse("blah", ()).map_err(|e| AttributeError::from(e)))
- );
- assert!(
- is_parse_error(&MarkerOrient::parse("45blah", ()).map_err(|e| AttributeError::from(e)))
- );
+ assert!(is_parse_error(
+ &MarkerOrient::parse("", ()).map_err(|e| AttributeError::from(e))
+ ));
+ assert!(is_parse_error(
+ &MarkerOrient::parse("blah", ()).map_err(|e| AttributeError::from(e))
+ ));
+ assert!(is_parse_error(
+ &MarkerOrient::parse("45blah", ()).map_err(|e| AttributeError::from(e))
+ ));
}
#[test]
@@ -1146,30 +1151,30 @@ mod directionality_tests {
#[test]
fn curve_has_directionality() {
- let (v1x, v1y, v2x, v2y) =
- super::get_segment_directionalities(&curve(1.0, 2.0, 3.0, 5.0, 8.0, 13.0, 20.0, 33.0))
- .unwrap();
+ let (v1x, v1y, v2x, v2y) = super::get_segment_directionalities(&curve(
+ 1.0, 2.0, 3.0, 5.0, 8.0, 13.0, 20.0, 33.0,
+ )).unwrap();
assert_eq!((2.0, 3.0), (v1x, v1y));
assert_eq!((12.0, 20.0), (v2x, v2y));
}
#[test]
fn curves_with_loops_and_coincident_ends_have_directionality() {
- let (v1x, v1y, v2x, v2y) =
- super::get_segment_directionalities(&curve(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 1.0, 2.0))
- .unwrap();
+ let (v1x, v1y, v2x, v2y) = super::get_segment_directionalities(&curve(
+ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 1.0, 2.0,
+ )).unwrap();
assert_eq!((2.0, 2.0), (v1x, v1y));
assert_eq!((-4.0, -4.0), (v2x, v2y));
- let (v1x, v1y, v2x, v2y) =
- super::get_segment_directionalities(&curve(1.0, 2.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0))
- .unwrap();
+ let (v1x, v1y, v2x, v2y) = super::get_segment_directionalities(&curve(
+ 1.0, 2.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0,
+ )).unwrap();
assert_eq!((2.0, 2.0), (v1x, v1y));
assert_eq!((-2.0, -2.0), (v2x, v2y));
- let (v1x, v1y, v2x, v2y) =
- super::get_segment_directionalities(&curve(1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 1.0, 2.0))
- .unwrap();
+ let (v1x, v1y, v2x, v2y) = super::get_segment_directionalities(&curve(
+ 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 1.0, 2.0,
+ )).unwrap();
assert_eq!((2.0, 2.0), (v1x, v1y));
assert_eq!((-2.0, -2.0), (v2x, v2y));
}
@@ -1184,18 +1189,18 @@ mod directionality_tests {
#[test]
fn curve_with_123_coincident_has_directionality() {
- let (v1x, v1y, v2x, v2y) =
- super::get_segment_directionalities(&curve(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 40.0))
- .unwrap();
+ let (v1x, v1y, v2x, v2y) = super::get_segment_directionalities(&curve(
+ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 20.0, 40.0,
+ )).unwrap();
assert_eq!((20.0, 40.0), (v1x, v1y));
assert_eq!((20.0, 40.0), (v2x, v2y));
}
#[test]
fn curve_with_234_coincident_has_directionality() {
- let (v1x, v1y, v2x, v2y) =
- super::get_segment_directionalities(&curve(20.0, 40.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))
- .unwrap();
+ let (v1x, v1y, v2x, v2y) = super::get_segment_directionalities(&curve(
+ 20.0, 40.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
+ )).unwrap();
assert_eq!((-20.0, -40.0), (v1x, v1y));
assert_eq!((-20.0, -40.0), (v2x, v2y));
@@ -1204,14 +1209,7 @@ mod directionality_tests {
#[test]
fn curve_with_12_34_coincident_has_directionality() {
let (v1x, v1y, v2x, v2y) = super::get_segment_directionalities(&curve(
- 20.0,
- 40.0,
- 20.0,
- 40.0,
- 60.0,
- 70.0,
- 60.0,
- 70.0,
+ 20.0, 40.0, 20.0, 40.0, 60.0, 70.0, 60.0, 70.0,
)).unwrap();
assert_eq!((40.0, 30.0), (v1x, v1y));
diff --git a/rsvg_internals/src/node.rs b/rsvg_internals/src/node.rs
index 0baa28c6..0b2ec462 100644
--- a/rsvg_internals/src/node.rs
+++ b/rsvg_internals/src/node.rs
@@ -536,8 +536,8 @@ mod tests {
use super::*;
use drawing_ctx::RsvgDrawingCtx;
use handle::RsvgHandle;
- use std::{mem, ptr};
use std::rc::Rc;
+ use std::{mem, ptr};
struct TestNodeImpl {}
diff --git a/rsvg_internals/src/paint_server.rs b/rsvg_internals/src/paint_server.rs
index e5b5a6c3..cea04135 100644
--- a/rsvg_internals/src/paint_server.rs
+++ b/rsvg_internals/src/paint_server.rs
@@ -234,10 +234,7 @@ pub fn _set_source_rsvg_paint_server(
|| node.get_type() == NodeType::RadialGradient
{
had_paint_server = gradient::gradient_resolve_fallbacks_and_set_pattern(
- &node,
- c_ctx,
- opacity,
- bbox,
+ &node, c_ctx, opacity, bbox,
);
} else if node.get_type() == NodeType::Pattern {
had_paint_server =
diff --git a/rsvg_internals/src/path_parser.rs b/rsvg_internals/src/path_parser.rs
index 8c438e06..34ef1754 100644
--- a/rsvg_internals/src/path_parser.rs
+++ b/rsvg_internals/src/path_parser.rs
@@ -175,7 +175,9 @@ impl<'b> PathParser<'b> {
fn lookahead_is_start_of_number(&mut self) -> bool {
let mut c = ' ';
- self.lookahead_is_digit(&mut c) || self.lookahead_is('.') || self.lookahead_is('+')
+ self.lookahead_is_digit(&mut c)
+ || self.lookahead_is('.')
+ || self.lookahead_is('+')
|| self.lookahead_is('-')
}
@@ -489,12 +491,15 @@ impl<'b> PathParser<'b> {
}
fn drawto_command(&mut self) -> Result<bool, ParseError> {
- Ok(
- self.close_path()? || self.line_to()? || self.horizontal_line_to()?
- || self.vertical_line_to()? || self.curve_to()?
- || self.smooth_curve_to()? || self.quadratic_bezier_curve_to()?
- || self.smooth_quadratic_bezier_curve_to()? || self.elliptical_arc()?,
- )
+ Ok(self.close_path()?
+ || self.line_to()?
+ || self.horizontal_line_to()?
+ || self.vertical_line_to()?
+ || self.curve_to()?
+ || self.smooth_curve_to()?
+ || self.quadratic_bezier_curve_to()?
+ || self.smooth_quadratic_bezier_curve_to()?
+ || self.elliptical_arc()?)
}
fn close_path(&mut self) -> Result<bool, ParseError> {
diff --git a/rsvg_internals/src/pattern.rs b/rsvg_internals/src/pattern.rs
index 3951af0e..92e507ac 100644
--- a/rsvg_internals/src/pattern.rs
+++ b/rsvg_internals/src/pattern.rs
@@ -108,10 +108,16 @@ impl Pattern {
}
fn is_resolved(&self) -> bool {
- self.units.is_some() && self.content_units.is_some() && self.vbox.is_some()
- && self.preserve_aspect_ratio.is_some() && self.affine.is_some()
- && self.x.is_some() && self.y.is_some() && self.width.is_some()
- && self.height.is_some() && self.children_are_resolved()
+ self.units.is_some()
+ && self.content_units.is_some()
+ && self.vbox.is_some()
+ && self.preserve_aspect_ratio.is_some()
+ && self.affine.is_some()
+ && self.x.is_some()
+ && self.y.is_some()
+ && self.width.is_some()
+ && self.height.is_some()
+ && self.children_are_resolved()
}
fn children_are_resolved(&self) -> bool {
diff --git a/rsvg_internals/src/shapes.rs b/rsvg_internals/src/shapes.rs
index 07d492ff..f73f82ae 100644
--- a/rsvg_internals/src/shapes.rs
+++ b/rsvg_internals/src/shapes.rs
@@ -229,10 +229,12 @@ impl NodeTrait for NodeLine {
fn set_atts(&self, _: &RsvgNode, _: *const RsvgHandle, pbag: &PropertyBag) -> NodeResult {
for (_key, attr, value) in pbag.iter() {
match attr {
- Attribute::X1 => self.x1
+ Attribute::X1 => self
+ .x1
.set(parse("x1", value, LengthDir::Horizontal, None)?),
Attribute::Y1 => self.y1.set(parse("y1", value, LengthDir::Vertical, None)?),
- Attribute::X2 => self.x2
+ Attribute::X2 => self
+ .x2
.set(parse("x2", value, LengthDir::Horizontal, None)?),
Attribute::Y2 => self.y2.set(parse("y2", value, LengthDir::Vertical, None)?),
_ => (),
@@ -307,18 +309,22 @@ impl NodeTrait for NodeRect {
Some(RsvgLength::check_nonnegative),
)?),
- Attribute::Rx => self.rx.set(parse(
- "rx",
- value,
- LengthDir::Horizontal,
- Some(RsvgLength::check_nonnegative),
- ).map(Some)?),
- Attribute::Ry => self.ry.set(parse(
- "ry",
- value,
- LengthDir::Vertical,
- Some(RsvgLength::check_nonnegative),
- ).map(Some)?),
+ Attribute::Rx => self.rx.set(
+ parse(
+ "rx",
+ value,
+ LengthDir::Horizontal,
+ Some(RsvgLength::check_nonnegative),
+ ).map(Some)?,
+ ),
+ Attribute::Ry => self.ry.set(
+ parse(
+ "ry",
+ value,
+ LengthDir::Vertical,
+ Some(RsvgLength::check_nonnegative),
+ ).map(Some)?,
+ ),
_ => (),
}
@@ -491,7 +497,8 @@ impl NodeTrait for NodeCircle {
fn set_atts(&self, _: &RsvgNode, _: *const RsvgHandle, pbag: &PropertyBag) -> NodeResult {
for (_key, attr, value) in pbag.iter() {
match attr {
- Attribute::Cx => self.cx
+ Attribute::Cx => self
+ .cx
.set(parse("cx", value, LengthDir::Horizontal, None)?),
Attribute::Cy => self.cy.set(parse("cy", value, LengthDir::Vertical, None)?),
Attribute::R => self.r.set(parse(
@@ -544,7 +551,8 @@ impl NodeTrait for NodeEllipse {
fn set_atts(&self, _: &RsvgNode, _: *const RsvgHandle, pbag: &PropertyBag) -> NodeResult {
for (_key, attr, value) in pbag.iter() {
match attr {
- Attribute::Cx => self.cx
+ Attribute::Cx => self
+ .cx
.set(parse("cx", value, LengthDir::Horizontal, None)?),
Attribute::Cy => self.cy.set(parse("cy", value, LengthDir::Vertical, None)?),
diff --git a/rsvg_internals/src/stop.rs b/rsvg_internals/src/stop.rs
index 3631a464..abe287a4 100644
--- a/rsvg_internals/src/stop.rs
+++ b/rsvg_internals/src/stop.rs
@@ -178,7 +178,9 @@ impl NodeTrait for NodeStop {
}
fn u32_from_rgba(rgba: cssparser::RGBA) -> u32 {
- (u32::from(rgba.red) << 24) | (u32::from(rgba.green) << 16) | (u32::from(rgba.blue) << 8)
+ (u32::from(rgba.red) << 24)
+ | (u32::from(rgba.green) << 16)
+ | (u32::from(rgba.blue) << 8)
| u32::from(rgba.alpha)
}
diff --git a/rsvg_internals/src/structure.rs b/rsvg_internals/src/structure.rs
index 9abb7843..0b2e183e 100644
--- a/rsvg_internals/src/structure.rs
+++ b/rsvg_internals/src/structure.rs
@@ -247,18 +247,22 @@ impl NodeTrait for NodeUse {
Attribute::X => self.x.set(parse("x", value, LengthDir::Horizontal, None)?),
Attribute::Y => self.y.set(parse("y", value, LengthDir::Vertical, None)?),
- Attribute::Width => self.w.set(parse(
- "width",
- value,
- LengthDir::Horizontal,
- Some(RsvgLength::check_nonnegative),
- ).map(Some)?),
- Attribute::Height => self.h.set(parse(
- "height",
- value,
- LengthDir::Vertical,
- Some(RsvgLength::check_nonnegative),
- ).map(Some)?),
+ Attribute::Width => self.w.set(
+ parse(
+ "width",
+ value,
+ LengthDir::Horizontal,
+ Some(RsvgLength::check_nonnegative),
+ ).map(Some)?,
+ ),
+ Attribute::Height => self.h.set(
+ parse(
+ "height",
+ value,
+ LengthDir::Vertical,
+ Some(RsvgLength::check_nonnegative),
+ ).map(Some)?,
+ ),
_ => (),
}
@@ -295,11 +299,13 @@ impl NodeTrait for NodeUse {
// From https://www.w3.org/TR/SVG/struct.html#UseElement in
// "If the ‘use’ element references a ‘symbol’ element"
- let nw = self.w
+ let nw = self
+ .w
.get()
.unwrap_or_else(|| RsvgLength::parse("100%", LengthDir::Horizontal).unwrap())
.normalize(draw_ctx);
- let nh = self.h
+ let nh = self
+ .h
.get()
.unwrap_or_else(|| RsvgLength::parse("100%", LengthDir::Vertical).unwrap())
.normalize(draw_ctx);
diff --git a/rsvg_internals/src/transform.rs b/rsvg_internals/src/transform.rs
index 12364901..30d216f5 100644
--- a/rsvg_internals/src/transform.rs
+++ b/rsvg_internals/src/transform.rs
@@ -119,10 +119,12 @@ fn parse_translate_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeE
.parse_nested_block(|p| {
let tx = f64::from(p.expect_number()?);
- let ty = f64::from(p.try(|p| -> Result<f32, CssParseError<()>> {
- optional_comma(p);
- Ok(p.expect_number()?)
- }).unwrap_or(0.0));
+ let ty = f64::from(
+ p.try(|p| -> Result<f32, CssParseError<()>> {
+ optional_comma(p);
+ Ok(p.expect_number()?)
+ }).unwrap_or(0.0),
+ );
Ok(cairo::Matrix::new(1.0, 0.0, 0.0, 1.0, tx, ty))
})
@@ -135,11 +137,12 @@ fn parse_scale_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeError
.parse_nested_block(|p| {
let x = f64::from(p.expect_number()?);
- let y = p.try(|p| -> Result<f32, CssParseError<()>> {
- optional_comma(p);
- Ok(p.expect_number()?)
- }).map(f64::from)
- .unwrap_or(x);
+ let y =
+ p.try(|p| -> Result<f32, CssParseError<()>> {
+ optional_comma(p);
+ Ok(p.expect_number()?)
+ }).map(f64::from)
+ .unwrap_or(x);
Ok(cairo::Matrix::new(x, 0.0, 0.0, y, 0.0, 0.0))
})
@@ -153,15 +156,16 @@ fn parse_rotate_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeErro
let angle = f64::from(p.expect_number()?) * PI / 180.0;
let (s, c) = angle.sin_cos();
- let (tx, ty) = p.try(|p| -> Result<_, CssParseError<()>> {
- optional_comma(p);
- let tx = f64::from(p.expect_number()?);
+ let (tx, ty) =
+ p.try(|p| -> Result<_, CssParseError<()>> {
+ optional_comma(p);
+ let tx = f64::from(p.expect_number()?);
- optional_comma(p);
- let ty = f64::from(p.expect_number()?);
+ optional_comma(p);
+ let ty = f64::from(p.expect_number()?);
- Ok((tx, ty))
- }).unwrap_or((0.0, 0.0));
+ Ok((tx, ty))
+ }).unwrap_or((0.0, 0.0));
let mut m = cairo::Matrix::new(1.0, 0.0, 0.0, 1.0, tx, ty);
diff --git a/rsvg_internals/src/viewbox.rs b/rsvg_internals/src/viewbox.rs
index 234d8d10..5914c944 100644
--- a/rsvg_internals/src/viewbox.rs
+++ b/rsvg_internals/src/viewbox.rs
@@ -4,8 +4,8 @@ use glib_sys;
use error::*;
use parsers;
-use parsers::{ListLength, ParseError};
use parsers::Parse;
+use parsers::{ListLength, ParseError};
use self::glib::translate::*;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]