summaryrefslogtreecommitdiff
path: root/subplotlib
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-01-17 14:55:53 +0200
committerLars Wirzenius <liw@liw.fi>2021-01-17 14:55:53 +0200
commit7f7cdfd9865762866cde19555bb0e5b2fbcc7c3b (patch)
tree399d1a56adde5be0832c3e53438f1cd558699c4b /subplotlib
parent276b958196df8486cd41542dd38076d2ece074ef (diff)
downloadsubplot-7f7cdfd9865762866cde19555bb0e5b2fbcc7c3b.tar.gz
fix: comparison with a slice of output
Diffstat (limited to 'subplotlib')
-rw-r--r--subplotlib/src/steplibrary/runcmd.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/subplotlib/src/steplibrary/runcmd.rs b/subplotlib/src/steplibrary/runcmd.rs
index 69787c0..02ec186 100644
--- a/subplotlib/src/steplibrary/runcmd.rs
+++ b/subplotlib/src/steplibrary/runcmd.rs
@@ -162,7 +162,7 @@ fn check_matches(runcmd: &Runcmd, which: Stream, how: MatchKind, against: &str)
unescape::unescape(against).ok_or("unable to unescape input")?
};
match how {
- MatchKind::Exact => stream == against.as_bytes(),
+ MatchKind::Exact => stream.as_slice() == against.as_bytes(),
MatchKind::Contains => stream
.windows(against.len())
.any(|window| window == against.as_bytes()),