[librsvg/librsvg-2.50] cargo fmt
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.50] cargo fmt
- Date: Fri, 2 Oct 2020 19:24:36 +0000 (UTC)
commit 876faa0d1cef272bf14c925056477e22a3700631
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Sep 22 10:22:52 2020 -0500
cargo fmt
rsvg_internals/src/drawing_ctx.rs | 21 +++------------------
rsvg_internals/src/handle.rs | 8 ++++++--
2 files changed, 9 insertions(+), 20 deletions(-)
---
diff --git a/rsvg_internals/src/drawing_ctx.rs b/rsvg_internals/src/drawing_ctx.rs
index b596244e..eefdcf9b 100644
--- a/rsvg_internals/src/drawing_ctx.rs
+++ b/rsvg_internals/src/drawing_ctx.rs
@@ -146,10 +146,7 @@ pub struct DrawingCtx {
}
pub enum DrawingMode {
- LimitToStack {
- node: Node,
- root: Node,
- },
+ LimitToStack { node: Node, root: Node },
OnlyNode(Node),
}
@@ -168,12 +165,7 @@ pub fn draw_tree(
) -> Result<BoundingBox, RenderingError> {
let (drawsub_stack, node) = match mode {
DrawingMode::LimitToStack { node, root } => {
- (node
- .ancestors()
- .map(|n| n.clone())
- .collect(),
- root,
- )
+ (node.ancestors().map(|n| n.clone()).collect(), root)
}
DrawingMode::OnlyNode(node) => (Vec::new(), node),
@@ -181,14 +173,7 @@ pub fn draw_tree(
let cascaded = CascadedValues::new_from_node(&node);
- let mut draw_ctx = DrawingCtx::new(
- cr,
- viewport,
- dpi,
- measuring,
- testing,
- drawsub_stack,
- );
+ let mut draw_ctx = DrawingCtx::new(cr, viewport, dpi, measuring, testing, drawsub_stack);
draw_ctx.draw_node_from_stack(&node, acquired_nodes, &cascaded, false)
}
diff --git a/rsvg_internals/src/handle.rs b/rsvg_internals/src/handle.rs
index c87f8e64..92c95706 100644
--- a/rsvg_internals/src/handle.rs
+++ b/rsvg_internals/src/handle.rs
@@ -7,7 +7,7 @@ use crate::bbox::BoundingBox;
use crate::css::{Origin, Stylesheet};
use crate::document::{AcquiredNodes, Document};
use crate::dpi::Dpi;
-use crate::drawing_ctx::{DrawingMode, ViewParams, draw_tree};
+use crate::drawing_ctx::{draw_tree, DrawingMode, ViewParams};
use crate::error::{DefsLookupErrorKind, LoadingError, RenderingError};
use crate::length::*;
use crate::node::{CascadedValues, Node, NodeBorrow};
@@ -395,7 +395,11 @@ fn unit_rectangle() -> Rect {
/// `width`, `height`, and `viewBox` attributes of the toplevel `<svg>`
/// element. If these are not available, then the size must be computed
/// by actually measuring the geometries of elements in the document.
-fn get_svg_size(dimensions: &IntrinsicDimensions, cascaded: &CascadedValues, dpi: Dpi) -> Option<(f64, f64)>
{
+fn get_svg_size(
+ dimensions: &IntrinsicDimensions,
+ cascaded: &CascadedValues,
+ dpi: Dpi,
+) -> Option<(f64, f64)> {
let values = cascaded.get();
// these defaults are per the spec
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]