diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2023-02-17 18:23:38 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2023-02-17 18:23:38 +0100 |
commit | 405cec9eed5d7f58440ec8495f5cbc1f5c6fee40 (patch) | |
tree | a115c0efc0cf1d50e54590dcb1663fec4a9751c4 /nihav-registry/src/detect.rs | |
parent | f638a5b1b3241b3433689983aca22d9e6518a64f (diff) | |
download | nihav-405cec9eed5d7f58440ec8495f5cbc1f5c6fee40.tar.gz |
rename "str" variable to avoid confusion with the primitive type
Diffstat (limited to 'nihav-registry/src/detect.rs')
-rw-r--r-- | nihav-registry/src/detect.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nihav-registry/src/detect.rs b/nihav-registry/src/detect.rs index bb452b2..3c5a60a 100644 --- a/nihav-registry/src/detect.rs +++ b/nihav-registry/src/detect.rs @@ -176,11 +176,11 @@ impl<'a> CC<'a> { CC::Le(ref arg) => { arg.le(src) }, CC::Gt(ref arg) => { arg.gt(src) }, CC::Ge(ref arg) => { arg.ge(src) }, - CC::Str(str) => { - let mut val: Vec<u8> = vec![0; str.len()]; + CC::Str(strng) => { + let mut val: Vec<u8> = vec![0; strng.len()]; let res = src.peek_buf(val.as_mut_slice()); if res.is_err() { return false; } - val == str + val == strng } } } |