1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use crate::structure::GValue;

pub struct DedupStep {
    params: Vec<GValue>,
}

impl DedupStep {
    fn new(params: Vec<GValue>) -> Self {
        DedupStep { params }
    }

    pub fn params(self) -> Vec<GValue> {
        self.params
    }
}

impl Into<DedupStep> for () {
    fn into(self) -> DedupStep {
        DedupStep::new(vec![])
    }
}

impl Into<DedupStep> for &str {
    fn into(self) -> DedupStep {
        DedupStep::new(vec![String::from(self).into()])
    }
}