[librsvg/librsvg-2.42: 16/17] Normalize the rustfmt of a few files I missed
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.42: 16/17] Normalize the rustfmt of a few files I missed
- Date: Fri, 2 Mar 2018 20:34:36 +0000 (UTC)
commit 1b95365b0a2e94df49653908924aa9b94c18cd35
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Mar 2 09:48:17 2018 -0600
Normalize the rustfmt of a few files I missed
rsvg_internals/src/coord_units.rs | 4 ++--
rsvg_internals/src/marker.rs | 6 ++---
rsvg_internals/src/viewport.rs | 46 +++++++++++++++++++++------------------
3 files changed, 30 insertions(+), 26 deletions(-)
---
diff --git a/rsvg_internals/src/coord_units.rs b/rsvg_internals/src/coord_units.rs
index b2ddc7cd..0877ee58 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);
@@ -62,7 +62,7 @@ macro_rules! coord_units {
Ok($name($crate::coord_units::CoordUnits::parse(s, ())?))
}
}
- }
+ };
}
#[cfg(test)]
diff --git a/rsvg_internals/src/marker.rs b/rsvg_internals/src/marker.rs
index e287ee0c..fd17966f 100644
--- a/rsvg_internals/src/marker.rs
+++ b/rsvg_internals/src/marker.rs
@@ -1047,7 +1047,7 @@ mod directionality_tests {
// Multiple closed subpaths; each must have a line segment back to their
// initial points, with no degenerate segments between subpaths.
- //
+ //
fn setup_multiple_closed_subpaths() -> RsvgPathBuilder {
let mut builder = RsvgPathBuilder::new();
@@ -1083,7 +1083,7 @@ mod directionality_tests {
// A lineto follows the first closed subpath, with no moveto to start the second subpath.
// The lineto must start at the first point of the first subpath.
- //
+ //
fn setup_no_moveto_after_closepath() -> RsvgPathBuilder {
let mut builder = RsvgPathBuilder::new();
@@ -1143,7 +1143,7 @@ mod directionality_tests {
//
// test_path_builder_to_segments (&setup_sequence_of_moveto (), expected_segments);
// }
- //
+ //
#[test]
fn degenerate_segment_has_no_directionality() {
diff --git a/rsvg_internals/src/viewport.rs b/rsvg_internals/src/viewport.rs
index d8a7ca3c..0d04343b 100644
--- a/rsvg_internals/src/viewport.rs
+++ b/rsvg_internals/src/viewport.rs
@@ -226,29 +226,33 @@ mod tests {
let mut affine = cairo::Matrix::identity();
affine.scale(0.25, 0.25);
- let mut ctx = Ctx { view_box_size: None,
- clipping_rect: None,
- affine: None,
- expected_view_box_size: Some((40.0, 40.0)),
- expected_clipping_rect: Some((10.0, 10.0, 10.0, 10.0)),
- expected_affine: Some(affine)
+ let mut ctx = Ctx {
+ view_box_size: None,
+ clipping_rect: None,
+ affine: None,
+
+ expected_view_box_size: Some((40.0, 40.0)),
+ expected_clipping_rect: Some((10.0, 10.0, 10.0, 10.0)),
+ expected_affine: Some(affine),
};
- call_in_viewport(10.0,
- 10.0,
- 10.0,
- 10.0,
- ClipMode::ClipToViewport,
- true,
- Some(ViewBox(cairo::Rectangle {
- x: 40.0,
- y: 40.0,
- width: 40.0,
- height: 40.0,
- })),
- AspectRatio::parse("xMidYMid meet", ()).unwrap(),
- cairo::Matrix::identity(),
- &mut ctx);
+ call_in_viewport(
+ 10.0,
+ 10.0,
+ 10.0,
+ 10.0,
+ ClipMode::ClipToViewport,
+ true,
+ Some(ViewBox(cairo::Rectangle {
+ x: 40.0,
+ y: 40.0,
+ width: 40.0,
+ height: 40.0,
+ })),
+ AspectRatio::parse("xMidYMid meet", ()).unwrap(),
+ cairo::Matrix::identity(),
+ &mut ctx,
+ );
}
#[test]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]