Skip to content

Commit cb46bd6

Browse files
mikemiles-devMichael Mileusnich
and
Michael Mileusnich
authored
Updates for Rust 1.76 (#29)
Co-authored-by: Michael Mileusnich <[email protected]>
1 parent ad41358 commit cb46bd6

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "netflow_parser"
33
description = "Parser for Netflow Cisco V5, V7, V9, IPFIX"
4-
version = "0.1.9"
4+
version = "0.2.0"
55
edition = "2021"
66
77
license = "MIT OR Apache-2.0"

RELEASES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 0.2.0
2+
* Clippy updates for 1.76
3+
14
# 0.1.9
25
* Fixed bug with flow counts in V9.
36

SECURITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
| Version | Supported |
66
| ------- | ------------------ |
7+
| 0.2.0 | :white_check_mark: |
78
| 0.1.9 | :white_check_mark: |
89
| 0.1.8 | :white_check_mark: |
910
| 0.1.7 | :white_check_mark: |

src/variable_versions/v9.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ pub struct V9 {
4545
pub flowsets: Vec<FlowSet>,
4646
}
4747

48-
fn parse_flowsets<'a, 'b>(
48+
fn parse_flowsets<'a>(
4949
i: &'a [u8],
50-
parser: &'b mut V9Parser,
50+
parser: &mut V9Parser,
5151
mut count: usize,
5252
) -> IResult<&'a [u8], Vec<FlowSet>> {
5353
let mut flowsets = vec![];
@@ -62,7 +62,7 @@ fn parse_flowsets<'a, 'b>(
6262
count = count.saturating_sub(1);
6363
} else if let Some(data) = flowset.data.as_ref() {
6464
count = count.saturating_sub(data.data_fields.len());
65-
} else if let Some(_) = flowset.options_data.as_ref() {
65+
} else if flowset.options_data.as_ref().is_some() {
6666
count = count.saturating_sub(1);
6767
}
6868

0 commit comments

Comments
 (0)