mirror of
https://github.com/achanda/ipnetwork.git
synced 2025-06-14 16:26:32 +00:00
4f7d898a86c076852c78347dda395271d8a9bd9b

Ipv{4,6}Network::new_unchecked
with Ipv{4,6}Network::new_checked
(#203)
* Replace `Ipv4Network::new_unchecked` with `Ipv4Network::new_checked` * Replace `Ipv6Network::new_unchecked` with `Ipv6Network::new_checked` * Update doc test for `Ipv{4,6}Network::new_checked` to use `should_panic` * Better demonstrate use of `Ipv{4,6}Network::new_checked` in const contexts * Add back `unsafe_code` lint at the deny level
ipnetwork
This is a library to work with IPv4 and IPv6 CIDRs in Rust
Run Clippy by doing
rustup component add clippy
cargo clippy
Installation
This crate works with Cargo. Assuming you have Rust and Cargo installed, simply check out the source and run tests:
git clone https://github.com/achanda/ipnetwork
cd ipnetwork
cargo test
You can also add ipnetwork
as a dependency to your project's Cargo.toml
:
[dependencies]
ipnetwork = "*"
Description
Languages
Rust
100%