[librsvg/librsvg-2.42: 14/17] clippy: remove 'needless_borrow's
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.42: 14/17] clippy: remove 'needless_borrow's
- Date: Fri, 2 Mar 2018 20:34:26 +0000 (UTC)
commit c237298cb1f4eac39dca4166c6e12ccb912c69f1
Author: Jordan Petridis <jordanpetridis protonmail com>
Date: Thu Mar 1 14:28:11 2018 +0200
clippy: remove 'needless_borrow's
rsvg_internals/src/gradient.rs | 4 ++--
rsvg_internals/src/node.rs | 2 +-
rsvg_internals/src/parsers.rs | 2 +-
rsvg_internals/src/pattern.rs | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/rsvg_internals/src/gradient.rs b/rsvg_internals/src/gradient.rs
index 7ae4f716..355ad6e7 100644
--- a/rsvg_internals/src/gradient.rs
+++ b/rsvg_internals/src/gradient.rs
@@ -725,7 +725,7 @@ fn resolve_fallbacks_and_set_pattern(
let resolved = resolve_gradient(gradient, &mut fallback_source);
- set_pattern_on_draw_context(&resolved, draw_ctx, opacity, &bbox)
+ set_pattern_on_draw_context(&resolved, draw_ctx, opacity, bbox)
}
pub fn gradient_resolve_fallbacks_and_set_pattern(
@@ -742,7 +742,7 @@ pub fn gradient_resolve_fallbacks_and_set_pattern(
node.with_impl(|node_gradient: &NodeGradient| {
let gradient = node_gradient.get_gradient_with_color_stops_from_node(node);
- did_set_gradient = resolve_fallbacks_and_set_pattern(&gradient, draw_ctx, opacity, &bbox);
+ did_set_gradient = resolve_fallbacks_and_set_pattern(&gradient, draw_ctx, opacity, bbox);
});
did_set_gradient
diff --git a/rsvg_internals/src/node.rs b/rsvg_internals/src/node.rs
index 9277fb25..d94a21bd 100644
--- a/rsvg_internals/src/node.rs
+++ b/rsvg_internals/src/node.rs
@@ -382,7 +382,7 @@ pub extern "C" fn rsvg_node_set_atts(
let node: &RsvgNode = unsafe { &*raw_node };
let pbag = unsafe { &*pbag };
- node.set_atts(node, handle, &pbag);
+ node.set_atts(node, handle, pbag);
}
#[no_mangle]
diff --git a/rsvg_internals/src/parsers.rs b/rsvg_internals/src/parsers.rs
index 4999a936..2f081add 100644
--- a/rsvg_internals/src/parsers.rs
+++ b/rsvg_internals/src/parsers.rs
@@ -283,7 +283,7 @@ pub extern "C" fn rsvg_css_parse_number_list(
let s = unsafe { utf8_cstr(in_str) };
- let result = number_list(&s, length);
+ let result = number_list(s, length);
match result {
Ok(number_list) => {
diff --git a/rsvg_internals/src/pattern.rs b/rsvg_internals/src/pattern.rs
index 32625165..0cdde5e4 100644
--- a/rsvg_internals/src/pattern.rs
+++ b/rsvg_internals/src/pattern.rs
@@ -70,7 +70,7 @@ fn node_has_children(node: &Option<Weak<Node>>) -> bool {
None => false,
Some(ref weak) => {
- let ref strong_node = weak.clone().upgrade().unwrap();
+ let strong_node = &weak.clone().upgrade().unwrap();
strong_node.has_children()
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]