[librsvg: 2/4] Follow naming conventions for methods taking self
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/4] Follow naming conventions for methods taking self
- Date: Mon, 24 Aug 2020 15:34:55 +0000 (UTC)
commit 04191c01e2d52f954e2636e89e0b3a9db1941157
Author: Sven Neumann <sven svenfoo org>
Date: Mon Aug 24 14:56:58 2020 +0200
Follow naming conventions for methods taking self
See https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
rsvg_internals/src/gradient.rs | 10 +++++-----
rsvg_internals/src/pattern.rs | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/rsvg_internals/src/gradient.rs b/rsvg_internals/src/gradient.rs
index 4118bff4..854e7a0f 100644
--- a/rsvg_internals/src/gradient.rs
+++ b/rsvg_internals/src/gradient.rs
@@ -155,7 +155,7 @@ enum Variant {
}
impl UnresolvedVariant {
- fn to_resolved(self) -> Variant {
+ fn into_resolved(self) -> Variant {
assert!(self.is_resolved());
match self {
@@ -395,7 +395,7 @@ pub struct Gradient {
}
impl UnresolvedGradient {
- fn to_resolved(self) -> Gradient {
+ fn into_resolved(self) -> Gradient {
assert!(self.is_resolved());
let UnresolvedGradient {
@@ -413,7 +413,7 @@ impl UnresolvedGradient {
spread: spread.unwrap(),
stops: stops.unwrap(),
- variant: variant.to_resolved(),
+ variant: variant.into_resolved(),
},
UnresolvedVariant::Radial { .. } => Gradient {
@@ -422,7 +422,7 @@ impl UnresolvedGradient {
spread: spread.unwrap(),
stops: stops.unwrap(),
- variant: variant.to_resolved(),
+ variant: variant.into_resolved(),
},
}
}
@@ -713,7 +713,7 @@ macro_rules! impl_paint_source {
}
}
- let gradient = gradient.to_resolved();
+ let gradient = gradient.into_resolved();
*resolved = Some(gradient.clone());
diff --git a/rsvg_internals/src/pattern.rs b/rsvg_internals/src/pattern.rs
index 0cc8ceac..e366036d 100644
--- a/rsvg_internals/src/pattern.rs
+++ b/rsvg_internals/src/pattern.rs
@@ -220,7 +220,7 @@ impl PaintSource for Pattern {
}
}
- let pattern = pattern.to_resolved();
+ let pattern = pattern.into_resolved();
*resolved = Some(pattern.clone());
@@ -385,7 +385,7 @@ impl AsPaintSource for ResolvedPattern {
}
impl UnresolvedPattern {
- fn to_resolved(self) -> ResolvedPattern {
+ fn into_resolved(self) -> ResolvedPattern {
assert!(self.is_resolved());
ResolvedPattern {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]