Skip to content

Commit 05de8a5

Browse files
committed
Support ipnetwork
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
1 parent ffe0135 commit 05de8a5

6 files changed

Lines changed: 2429 additions & 1235 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
build:
14-
13+
stable:
1514
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: dtolnay/rust-toolchain@stable
18+
- run: cargo build --verbose --all-features
19+
- run: cargo test --verbose --all-features
1620

21+
msrv:
22+
runs-on: ubuntu-latest
1723
steps:
18-
- uses: actions/checkout@v2
19-
- uses: actions-rs/toolchain@v1
20-
with:
21-
toolchain: 1.31
24+
- uses: actions/checkout@v4
25+
- uses: dtolnay/rust-toolchain@1.31.0
26+
- run: cargo update -p ipnet --precise 2.7.2
2227
- run: cargo build --verbose
23-
- run: cargo build --verbose --all-features
2428
- run: cargo test --verbose
25-
- run: cargo test --verbose --all-features

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
Cargo.lock
44
.vscode
55
.idea
6-
.DS_Store
6+
.DS_Store

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ categories = ["network-programming"]
1010
license = "MIT"
1111

1212
[dependencies]
13-
ipnet = "2.0.0"
13+
ipnet = { version = "2", optional = true }
14+
ipnetwork = { version = "0.21", optional = true }
1415
serde = { version = "1", features = ["derive"], optional = true }
1516

17+
[features]
18+
default = ["ipnet"]
19+
1620
[dev-dependencies]
1721
rand = "0.3.17"
1822
bincode = "1"

0 commit comments

Comments
 (0)