mirror of
https://github.com/ricoriedel/wipe.git
synced 2024-11-04 23:26:41 +00:00
Remove name function
This commit is contained in:
parent
dcbae98ed3
commit
32cd72552e
@ -9,10 +9,6 @@ pub struct Circle {
|
||||
}
|
||||
|
||||
impl PatternFactory for CircleFactory {
|
||||
fn name(&self) -> String {
|
||||
stringify!(Circle).to_lowercase()
|
||||
}
|
||||
|
||||
fn create(&self, config: &Config) -> Box<dyn Pattern> {
|
||||
Box::new(Circle::new(config))
|
||||
}
|
||||
@ -38,11 +34,6 @@ mod test {
|
||||
use super::*;
|
||||
use approx::*;
|
||||
|
||||
#[test]
|
||||
fn name() {
|
||||
assert_eq!("circle", CircleFactory::default().name());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sample() {
|
||||
let config = Config {
|
||||
|
@ -8,10 +8,6 @@ pub struct Line {
|
||||
}
|
||||
|
||||
impl PatternFactory for LineFactory {
|
||||
fn name(&self) -> String {
|
||||
stringify!(Line).to_lowercase()
|
||||
}
|
||||
|
||||
fn create(&self, config: &Config) -> Box<dyn Pattern> {
|
||||
Box::new(Line::new(config))
|
||||
}
|
||||
@ -36,11 +32,6 @@ mod test {
|
||||
use super::*;
|
||||
use approx::*;
|
||||
|
||||
#[test]
|
||||
fn name() {
|
||||
assert_eq!("line", LineFactory::default().name());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sample() {
|
||||
let config = Config {
|
||||
|
@ -17,8 +17,6 @@ pub struct Config {
|
||||
}
|
||||
|
||||
pub trait PatternFactory {
|
||||
fn name(&self) -> String;
|
||||
|
||||
fn create(&self, config: &Config) -> Box<dyn Pattern>;
|
||||
}
|
||||
|
||||
|
@ -9,10 +9,6 @@ pub struct Rhombus {
|
||||
}
|
||||
|
||||
impl PatternFactory for RhombusFactory {
|
||||
fn name(&self) -> String {
|
||||
stringify!(Rhombus).to_lowercase()
|
||||
}
|
||||
|
||||
fn create(&self, config: &Config) -> Box<dyn Pattern> {
|
||||
Box::new(Rhombus::new(config))
|
||||
}
|
||||
@ -38,11 +34,6 @@ mod test {
|
||||
use super::*;
|
||||
use approx::*;
|
||||
|
||||
#[test]
|
||||
fn name() {
|
||||
assert_eq!("rhombus", RhombusFactory::default().name());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sample() {
|
||||
let config = Config {
|
||||
|
@ -9,10 +9,6 @@ pub struct Wheel {
|
||||
}
|
||||
|
||||
impl PatternFactory for WheelFactory {
|
||||
fn name(&self) -> String {
|
||||
stringify!(Wheel).to_lowercase()
|
||||
}
|
||||
|
||||
fn create(&self, config: &Config) -> Box<dyn Pattern> {
|
||||
Box::new(Wheel::new(config))
|
||||
}
|
||||
@ -37,11 +33,6 @@ mod test {
|
||||
use super::*;
|
||||
use approx::*;
|
||||
|
||||
#[test]
|
||||
fn name() {
|
||||
assert_eq!("wheel", WheelFactory::default().name());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sample() {
|
||||
let config = Config {
|
||||
|
Loading…
Reference in New Issue
Block a user