diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-01-17 14:55:53 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-01-17 14:55:53 +0200 |
commit | 7f7cdfd9865762866cde19555bb0e5b2fbcc7c3b (patch) | |
tree | 399d1a56adde5be0832c3e53438f1cd558699c4b /subplotlib | |
parent | 276b958196df8486cd41542dd38076d2ece074ef (diff) | |
download | subplot-7f7cdfd9865762866cde19555bb0e5b2fbcc7c3b.tar.gz |
fix: comparison with a slice of output
Diffstat (limited to 'subplotlib')
-rw-r--r-- | subplotlib/src/steplibrary/runcmd.rs | 2 |
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()), |