Skip to content

Commit

Permalink
Hide some fields in the structure that are not necessarily exposed
Browse files Browse the repository at this point in the history
  • Loading branch information
rikonaka committed Nov 22, 2024
1 parent 83ef0a2 commit cb972ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "subnetwork"
version = "0.4.7"
version = "0.4.8"
edition = "2021"
license = "MIT"
description = "Return all ip addresses of a subnetwork"
Expand Down
32 changes: 16 additions & 16 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ pub enum SubnetworkErrors {

#[derive(Debug, Clone, Copy)]
pub struct CrossIpv4Pool {
pub start: u32,
pub end: u32,
pub next: u32,
start: u32,
end: u32,
next: u32,
}

impl Iterator for CrossIpv4Pool {
Expand Down Expand Up @@ -86,10 +86,10 @@ impl CrossIpv4Pool {

#[derive(Debug, Clone, Copy)]
pub struct Ipv4Pool {
pub prefix: u32,
pub mask: u32,
pub next: u32,
pub stop: u32,
prefix: u32,
mask: u32,
next: u32,
stop: u32,
}

impl Iterator for Ipv4Pool {
Expand Down Expand Up @@ -292,9 +292,9 @@ impl Ipv4Pool {

#[derive(Debug, Clone, Copy)]
pub struct CrossIpv6Pool {
pub start: u128,
pub end: u128,
pub next: u128,
start: u128,
end: u128,
next: u128,
}

impl Iterator for CrossIpv6Pool {
Expand Down Expand Up @@ -356,10 +356,10 @@ impl CrossIpv6Pool {

#[derive(Debug, Clone, Copy)]
pub struct Ipv6Pool {
pub prefix: u128,
pub mask: u128,
pub next: u128,
pub stop: u128,
prefix: u128,
mask: u128,
next: u128,
stop: u128,
}

impl Iterator for Ipv6Pool {
Expand Down Expand Up @@ -556,7 +556,7 @@ impl Ipv6Pool {

#[derive(Debug, Clone, Copy)]
pub struct Ipv4 {
pub addr: u32,
addr: u32,
}

impl fmt::Display for Ipv4 {
Expand Down Expand Up @@ -663,7 +663,7 @@ impl Ipv4 {

#[derive(Debug, Clone, Copy)]
pub struct Ipv6 {
pub addr: u128,
addr: u128,
}

impl fmt::Display for Ipv6 {
Expand Down

0 comments on commit cb972ac

Please sign in to comment.