[librsvg: 1/8] Remove unnecessary type parameters in Primitive::new and PrimitiveWithInput::new
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/8] Remove unnecessary type parameters in Primitive::new and PrimitiveWithInput::new
- Date: Thu, 11 Mar 2021 03:13:21 +0000 (UTC)
commit 0727c4116302d1c4621537be2a24c8c9dfe31b4d
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Mar 10 16:56:52 2021 -0600
Remove unnecessary type parameters in Primitive::new and PrimitiveWithInput::new
src/filters/blend.rs | 2 +-
src/filters/color_matrix.rs | 2 +-
src/filters/component_transfer.rs | 2 +-
src/filters/composite.rs | 2 +-
src/filters/convolve_matrix.rs | 2 +-
src/filters/displacement_map.rs | 2 +-
src/filters/flood.rs | 2 +-
src/filters/gaussian_blur.rs | 2 +-
src/filters/image.rs | 2 +-
src/filters/lighting.rs | 4 ++--
src/filters/merge.rs | 2 +-
src/filters/mod.rs | 6 +++---
src/filters/morphology.rs | 2 +-
src/filters/offset.rs | 2 +-
src/filters/tile.rs | 2 +-
src/filters/turbulence.rs | 2 +-
16 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/src/filters/blend.rs b/src/filters/blend.rs
index 2d7050d4..f93329f2 100755
--- a/src/filters/blend.rs
+++ b/src/filters/blend.rs
@@ -47,7 +47,7 @@ impl Default for FeBlend {
#[inline]
fn default() -> FeBlend {
FeBlend {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
in2: None,
mode: Mode::default(),
}
diff --git a/src/filters/color_matrix.rs b/src/filters/color_matrix.rs
index 857d2c3d..c56ef141 100644
--- a/src/filters/color_matrix.rs
+++ b/src/filters/color_matrix.rs
@@ -39,7 +39,7 @@ impl Default for FeColorMatrix {
#[inline]
fn default() -> FeColorMatrix {
FeColorMatrix {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
matrix: Matrix5::identity(),
}
}
diff --git a/src/filters/component_transfer.rs b/src/filters/component_transfer.rs
index a80d3551..f2745a5b 100644
--- a/src/filters/component_transfer.rs
+++ b/src/filters/component_transfer.rs
@@ -28,7 +28,7 @@ impl Default for FeComponentTransfer {
#[inline]
fn default() -> FeComponentTransfer {
FeComponentTransfer {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
}
}
}
diff --git a/src/filters/composite.rs b/src/filters/composite.rs
index 1779fc68..7bd10314 100644
--- a/src/filters/composite.rs
+++ b/src/filters/composite.rs
@@ -39,7 +39,7 @@ impl Default for FeComposite {
#[inline]
fn default() -> FeComposite {
FeComposite {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
in2: None,
operator: Operator::Over,
k1: 0.0,
diff --git a/src/filters/convolve_matrix.rs b/src/filters/convolve_matrix.rs
index 97273b5a..5e70d5c4 100644
--- a/src/filters/convolve_matrix.rs
+++ b/src/filters/convolve_matrix.rs
@@ -41,7 +41,7 @@ impl Default for FeConvolveMatrix {
#[inline]
fn default() -> FeConvolveMatrix {
FeConvolveMatrix {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
order: (3, 3),
kernel_matrix: None,
divisor: 0.0,
diff --git a/src/filters/displacement_map.rs b/src/filters/displacement_map.rs
index 0d9904a7..0498c66a 100644
--- a/src/filters/displacement_map.rs
+++ b/src/filters/displacement_map.rs
@@ -36,7 +36,7 @@ impl Default for FeDisplacementMap {
#[inline]
fn default() -> FeDisplacementMap {
FeDisplacementMap {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
in2: None,
scale: 0.0,
x_channel_selector: ColorChannel::A,
diff --git a/src/filters/flood.rs b/src/filters/flood.rs
index d91092f0..a20d72a7 100644
--- a/src/filters/flood.rs
+++ b/src/filters/flood.rs
@@ -17,7 +17,7 @@ impl Default for FeFlood {
#[inline]
fn default() -> FeFlood {
FeFlood {
- base: Primitive::new::<Self>(),
+ base: Primitive::new(),
}
}
}
diff --git a/src/filters/gaussian_blur.rs b/src/filters/gaussian_blur.rs
index 6bf42cc8..5d652d05 100644
--- a/src/filters/gaussian_blur.rs
+++ b/src/filters/gaussian_blur.rs
@@ -35,7 +35,7 @@ impl Default for FeGaussianBlur {
#[inline]
fn default() -> FeGaussianBlur {
FeGaussianBlur {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
std_deviation: (0.0, 0.0),
}
}
diff --git a/src/filters/image.rs b/src/filters/image.rs
index fb7d2006..6044dfc7 100644
--- a/src/filters/image.rs
+++ b/src/filters/image.rs
@@ -27,7 +27,7 @@ impl Default for FeImage {
#[inline]
fn default() -> FeImage {
FeImage {
- base: Primitive::new::<Self>(),
+ base: Primitive::new(),
aspect: AspectRatio::default(),
href: None,
}
diff --git a/src/filters/lighting.rs b/src/filters/lighting.rs
index 8b8eb67b..51042a1d 100644
--- a/src/filters/lighting.rs
+++ b/src/filters/lighting.rs
@@ -317,7 +317,7 @@ pub struct FeDiffuseLighting {
impl Default for FeDiffuseLighting {
fn default() -> Self {
Self {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
surface_scale: 1.0,
kernel_unit_length: None,
diffuse_constant: 1.0,
@@ -380,7 +380,7 @@ pub struct FeSpecularLighting {
impl Default for FeSpecularLighting {
fn default() -> Self {
Self {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
surface_scale: 1.0,
kernel_unit_length: None,
specular_constant: 1.0,
diff --git a/src/filters/merge.rs b/src/filters/merge.rs
index f6aa6f8e..de3b2a57 100644
--- a/src/filters/merge.rs
+++ b/src/filters/merge.rs
@@ -28,7 +28,7 @@ impl Default for FeMerge {
#[inline]
fn default() -> FeMerge {
FeMerge {
- base: Primitive::new::<Self>(),
+ base: Primitive::new(),
}
}
}
diff --git a/src/filters/mod.rs b/src/filters/mod.rs
index ed36c727..6a4c0e78 100644
--- a/src/filters/mod.rs
+++ b/src/filters/mod.rs
@@ -124,7 +124,7 @@ struct PrimitiveWithInput {
impl Primitive {
/// Constructs a new `Primitive` with empty properties.
#[inline]
- fn new<T: FilterEffect>() -> Primitive {
+ fn new() -> Primitive {
Primitive {
x: None,
y: None,
@@ -192,9 +192,9 @@ impl SetAttributes for Primitive {
impl PrimitiveWithInput {
/// Constructs a new `PrimitiveWithInput` with empty properties.
#[inline]
- fn new<T: FilterEffect>() -> PrimitiveWithInput {
+ fn new() -> PrimitiveWithInput {
PrimitiveWithInput {
- base: Primitive::new::<T>(),
+ base: Primitive::new(),
in_: None,
}
}
diff --git a/src/filters/morphology.rs b/src/filters/morphology.rs
index efe80116..8a1628c7 100644
--- a/src/filters/morphology.rs
+++ b/src/filters/morphology.rs
@@ -38,7 +38,7 @@ impl Default for FeMorphology {
#[inline]
fn default() -> FeMorphology {
FeMorphology {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
operator: Operator::Erode,
radius: (0.0, 0.0),
}
diff --git a/src/filters/offset.rs b/src/filters/offset.rs
index 8cc42cd8..3446209a 100644
--- a/src/filters/offset.rs
+++ b/src/filters/offset.rs
@@ -22,7 +22,7 @@ impl Default for FeOffset {
#[inline]
fn default() -> FeOffset {
FeOffset {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
dx: 0f64,
dy: 0f64,
}
diff --git a/src/filters/tile.rs b/src/filters/tile.rs
index 5d8eeeb0..1638d8dd 100644
--- a/src/filters/tile.rs
+++ b/src/filters/tile.rs
@@ -17,7 +17,7 @@ impl Default for FeTile {
#[inline]
fn default() -> FeTile {
FeTile {
- base: PrimitiveWithInput::new::<Self>(),
+ base: PrimitiveWithInput::new(),
}
}
}
diff --git a/src/filters/turbulence.rs b/src/filters/turbulence.rs
index 3d7cb888..dfdaedb7 100644
--- a/src/filters/turbulence.rs
+++ b/src/filters/turbulence.rs
@@ -46,7 +46,7 @@ impl Default for FeTurbulence {
#[inline]
fn default() -> FeTurbulence {
FeTurbulence {
- base: Primitive::new::<Self>(),
+ base: Primitive::new(),
base_frequency: (0.0, 0.0),
num_octaves: 1,
seed: 0,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]