[librsvg: 44/45] Clone the stops directly; don't use a helper clone_stops()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 44/45] Clone the stops directly; don't use a helper clone_stops()
- Date: Tue, 1 Oct 2019 15:10:38 +0000 (UTC)
commit 233b26c67debd362edb0d97833f6676414263301
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Oct 1 08:16:39 2019 -0500
Clone the stops directly; don't use a helper clone_stops()
rsvg_internals/src/gradient.rs | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
---
diff --git a/rsvg_internals/src/gradient.rs b/rsvg_internals/src/gradient.rs
index ec961382..364f577f 100644
--- a/rsvg_internals/src/gradient.rs
+++ b/rsvg_internals/src/gradient.rs
@@ -418,14 +418,6 @@ impl UnresolvedGradient {
}
}
- fn clone_stops(&self) -> Option<Vec<ColorStop>> {
- if let Some(ref stops) = self.stops {
- Some(stops.clone())
- } else {
- None
- }
- }
-
/// Helper for add_color_stops_from_node()
fn add_color_stop(
&mut self,
@@ -503,7 +495,7 @@ impl UnresolvedGradient {
let units = fallback_to!(self.units, fallback.units);
let affine = fallback_to!(self.affine, fallback.affine);
let spread = fallback_to!(self.spread, fallback.spread);
- let stops = fallback_to!(self.stops, fallback.clone_stops());
+ let stops = fallback_to!(self.stops, fallback.stops.clone());
let variant = self.variant.resolve_from_fallback(&fallback.variant);
UnresolvedGradient { units, affine, spread, stops, variant }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]