Skip to content

Updates for Rust 1.76 #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "netflow_parser"
description = "Parser for Netflow Cisco V5, V7, V9, IPFIX"
version = "0.1.9"
version = "0.2.0"
edition = "2021"
author = "[email protected]"
license = "MIT OR Apache-2.0"
Expand Down
3 changes: 3 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.2.0
* Clippy updates for 1.76

# 0.1.9
* Fixed bug with flow counts in V9.

Expand Down
1 change: 1 addition & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

| Version | Supported |
| ------- | ------------------ |
| 0.2.0 | :white_check_mark: |
| 0.1.9 | :white_check_mark: |
| 0.1.8 | :white_check_mark: |
| 0.1.7 | :white_check_mark: |
Expand Down
6 changes: 3 additions & 3 deletions src/variable_versions/v9.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ pub struct V9 {
pub flowsets: Vec<FlowSet>,
}

fn parse_flowsets<'a, 'b>(
fn parse_flowsets<'a>(
i: &'a [u8],
parser: &'b mut V9Parser,
parser: &mut V9Parser,
mut count: usize,
) -> IResult<&'a [u8], Vec<FlowSet>> {
let mut flowsets = vec![];
Expand All @@ -62,7 +62,7 @@ fn parse_flowsets<'a, 'b>(
count = count.saturating_sub(1);
} else if let Some(data) = flowset.data.as_ref() {
count = count.saturating_sub(data.data_fields.len());
} else if let Some(_) = flowset.options_data.as_ref() {
} else if flowset.options_data.as_ref().is_some() {
count = count.saturating_sub(1);
}

Expand Down