Skip to content

Commit

Permalink
Add the comment field to a map
Browse files Browse the repository at this point in the history
The comments can be added to the map.
  • Loading branch information
marcinosypka committed Jan 18, 2024
1 parent d1ac323 commit 3c87c23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ pub struct Map {
pub gc_interval: Option<u32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub size: Option<u32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
}

#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
Expand Down
1 change: 1 addition & 0 deletions tests/helper_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ fn example_ruleset() -> schema::Nftables {
timeout: None,
gc_interval: None,
size: None,
comment: None,
}));
// add element to set
batch.add(schema::NfListObject::Element(schema::Element {
Expand Down

0 comments on commit 3c87c23

Please sign in to comment.