summaryrefslogtreecommitdiff
path: root/src/matches.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/matches.rs')
-rw-r--r--src/matches.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/matches.rs b/src/matches.rs
index 89cf791..27a71e1 100644
--- a/src/matches.rs
+++ b/src/matches.rs
@@ -46,16 +46,18 @@ pub struct MatchedStep {
text: String,
parts: Vec<PartialStep>,
function: String,
+ cleanup: Option<String>,
}
impl MatchedStep {
/// Return a new empty match. Empty means it has no step parts.
- pub fn new(kind: StepKind, function: &str) -> MatchedStep {
+ pub fn new(kind: StepKind, function: &str, cleanup: Option<&str>) -> MatchedStep {
MatchedStep {
kind,
text: "".to_string(),
parts: vec![],
function: function.to_string(),
+ cleanup: cleanup.map(String::from),
}
}