From 9cbf540e5e030af7aa0e894bef033e0addf0354e Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 12 Nov 2021 10:05:34 +0530 Subject: [PATCH] Remove `Action::Remove` You can just use an empty string in replace instead --- src/config.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/config.rs b/src/config.rs index b268f9e..4132296 100644 --- a/src/config.rs +++ b/src/config.rs @@ -58,8 +58,6 @@ pub enum Action { Prefix { prefix: String }, #[serde(rename = "suffix")] Suffix { suffix: String }, - #[serde(rename = "remove")] - Remove { substring: String }, } impl Act for Action { @@ -68,7 +66,6 @@ impl Act for Action { Action::Replace { from, to } => input.replace(&from, &to), Action::Prefix { prefix } => format!("{}{}", prefix, input), Action::Suffix { suffix } => format!("{}{}", input, suffix), - Action::Remove { substring } => input.replace(&substring, ""), }; } }