mirror of
https://github.com/msfjarvis/clipboard-substitutor
synced 2025-08-14 20:07:01 +05:30
Remove Action::Remove
You can just use an empty string in replace instead
This commit is contained in:
parent
3fd078e51b
commit
9cbf540e5e
1 changed files with 0 additions and 3 deletions
|
@ -58,8 +58,6 @@ pub enum Action {
|
||||||
Prefix { prefix: String },
|
Prefix { prefix: String },
|
||||||
#[serde(rename = "suffix")]
|
#[serde(rename = "suffix")]
|
||||||
Suffix { suffix: String },
|
Suffix { suffix: String },
|
||||||
#[serde(rename = "remove")]
|
|
||||||
Remove { substring: String },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Act for Action {
|
impl Act for Action {
|
||||||
|
@ -68,7 +66,6 @@ impl Act for Action {
|
||||||
Action::Replace { from, to } => input.replace(&from, &to),
|
Action::Replace { from, to } => input.replace(&from, &to),
|
||||||
Action::Prefix { prefix } => format!("{}{}", prefix, input),
|
Action::Prefix { prefix } => format!("{}{}", prefix, input),
|
||||||
Action::Suffix { suffix } => format!("{}{}", input, suffix),
|
Action::Suffix { suffix } => format!("{}{}", input, suffix),
|
||||||
Action::Remove { substring } => input.replace(&substring, ""),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue