[librsvg: 2/4] Reformat using 'cargo fmt'
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/4] Reformat using 'cargo fmt'
- Date: Fri, 7 Feb 2020 20:47:57 +0000 (UTC)
commit 28f20906205e8ab164ab01d9fa54ab513e8d8ccb
Author: Sven Neumann <sven svenfoo org>
Date: Sun Feb 2 18:23:21 2020 +0100
Reformat using 'cargo fmt'
This brings formatting in sync with the output of rustfmt.
librsvg/c_api.rs | 2 +-
librsvg_crate/tests/api.rs | 3 ++-
librsvg_crate/tests/utils/compare_surfaces.rs | 2 +-
rsvg_internals/src/document.rs | 2 +-
rsvg_internals/src/pattern.rs | 10 +++++++---
5 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/librsvg/c_api.rs b/librsvg/c_api.rs
index 98585ac2..9ffa966b 100644
--- a/librsvg/c_api.rs
+++ b/librsvg/c_api.rs
@@ -701,7 +701,7 @@ impl CHandle {
rsvg_handle_set_stylesheet()",
);
Err(LoadingError::Unknown)
- },
+ }
}
}
diff --git a/librsvg_crate/tests/api.rs b/librsvg_crate/tests/api.rs
index 548a13a1..6f4c2188 100644
--- a/librsvg_crate/tests/api.rs
+++ b/librsvg_crate/tests/api.rs
@@ -185,7 +185,8 @@ fn set_stylesheet() {
"##,
);
- svg.set_stylesheet("rect { fill: #00ff00; }").expect("should be a valid stylesheet");
+ svg.set_stylesheet("rect { fill: #00ff00; }")
+ .expect("should be a valid stylesheet");
let renderer = CairoRenderer::new(&svg);
diff --git a/librsvg_crate/tests/utils/compare_surfaces.rs b/librsvg_crate/tests/utils/compare_surfaces.rs
index f72958a7..91a69474 100644
--- a/librsvg_crate/tests/utils/compare_surfaces.rs
+++ b/librsvg_crate/tests/utils/compare_surfaces.rs
@@ -1,10 +1,10 @@
-use rsvg_internals;
use self::rsvg_internals::surface_utils::{
iterators::Pixels,
shared_surface::{SharedImageSurface, SurfaceType},
ImageSurfaceDataExt, Pixel,
};
use self::rsvg_internals::{IRect, RenderingError};
+use rsvg_internals;
pub enum BufferDiff {
DifferentSizes,
diff --git a/rsvg_internals/src/document.rs b/rsvg_internals/src/document.rs
index 67bff621..027f82a6 100644
--- a/rsvg_internals/src/document.rs
+++ b/rsvg_internals/src/document.rs
@@ -522,7 +522,7 @@ impl DocumentBuilder {
ids,
externs: RefCell::new(Resources::new()),
images: RefCell::new(Images::new()),
- load_options: load_options,
+ load_options,
stylesheets,
};
diff --git a/rsvg_internals/src/pattern.rs b/rsvg_internals/src/pattern.rs
index 61a1c0e9..c7a1346c 100644
--- a/rsvg_internals/src/pattern.rs
+++ b/rsvg_internals/src/pattern.rs
@@ -352,9 +352,13 @@ impl AsPaintSource for ResolvedPattern {
let res = draw_ctx.with_alpha(opacity, &mut |dc| {
let pattern_cascaded = CascadedValues::new_from_node(&node);
let pattern_values = pattern_cascaded.get();
- dc.with_discrete_layer(&node, acquired_nodes, pattern_values, false, &mut |an, dc| {
- node.draw_children(an, &pattern_cascaded, dc, false)
- })
+ dc.with_discrete_layer(
+ &node,
+ acquired_nodes,
+ pattern_values,
+ false,
+ &mut |an, dc| node.draw_children(an, &pattern_cascaded, dc, false),
+ )
});
// Return to the original coordinate system and rendering context
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]