Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.23 KB

Readme.md

File metadata and controls

57 lines (39 loc) · 1.23 KB

sna

An implementation of Serial Number Arithmetic as defined by RFC 1982 for Rust.

Version Travis AppVeyor Codecov

Usage

Add this to your Cargo.toml:

[dependencies]
sna = "0.1"

Add this to your crate:

extern crate sna;

Examples

use sna::SerialNumber;

let zero = SerialNumber(0u8);
let one = SerialNumber(1u8);

assert_eq!(0u8, one + 255u8);
assert!(zero > 255u8);

Linting

To run clippy lints, compile the library with --features clippy on a nightly compiler:

$ cargo build --features clippy

If nightly is not your default compiler:

$ rustup run nightly cargo build --features clippy