[librsvg] rustfmt
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] rustfmt
- Date: Fri, 1 Jun 2018 15:52:51 +0000 (UTC)
commit 7fa9ebb12f628e06484a2330a2ecdd919ad1d51f
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Jun 1 10:52:14 2018 -0500
rustfmt
rsvg_internals/src/property_macros.rs | 2 +-
rsvg_internals/src/shapes.rs | 28 ++++++++++++++++------------
rsvg_internals/src/structure.rs | 28 ++++++++++++++++------------
rsvg_internals/src/unitinterval.rs | 8 +++++---
4 files changed, 38 insertions(+), 28 deletions(-)
---
diff --git a/rsvg_internals/src/property_macros.rs b/rsvg_internals/src/property_macros.rs
index 5054c9e2..cc08fffc 100644
--- a/rsvg_internals/src/property_macros.rs
+++ b/rsvg_internals/src/property_macros.rs
@@ -14,7 +14,7 @@ pub trait Property<T> {
/// make_property!(
/// StrokeLinejoin,
/// default: Miter,
-///
+///
/// "miter" => Miter,
/// "round" => Round,
/// "bevel" => Bevel,
diff --git a/rsvg_internals/src/shapes.rs b/rsvg_internals/src/shapes.rs
index 0cf1089d..8c1b00d1 100644
--- a/rsvg_internals/src/shapes.rs
+++ b/rsvg_internals/src/shapes.rs
@@ -327,18 +327,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)?,
+ ),
_ => (),
}
diff --git a/rsvg_internals/src/structure.rs b/rsvg_internals/src/structure.rs
index f34960eb..d6fd4963 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)?,
+ ),
_ => (),
}
diff --git a/rsvg_internals/src/unitinterval.rs b/rsvg_internals/src/unitinterval.rs
index 24594b9b..022cf170 100644
--- a/rsvg_internals/src/unitinterval.rs
+++ b/rsvg_internals/src/unitinterval.rs
@@ -20,9 +20,11 @@ impl FromStr for UnitInterval {
let mut input = cssparser::ParserInput::new(s);
let mut parser = cssparser::Parser::new(&mut input);
- let x = f64::from(parser
- .expect_number()
- .map_err(|_| AttributeError::Parse(ParseError::new("expected number")))?);
+ let x = f64::from(
+ parser
+ .expect_number()
+ .map_err(|_| AttributeError::Parse(ParseError::new("expected number")))?,
+ );
let cx = if x < 0.0 {
0.0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]