pim-core 0.1.8

Core types, traits, and configuration for the Proximity Internet Mesh protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::super::*;

#[test]
fn error_display() {
    let err = PimError::Crypto("bad key".into());
    assert_eq!(format!("{err}"), "crypto error: bad key");
}

#[test]
fn error_from_io() {
    let io_err = std::io::Error::new(std::io::ErrorKind::NotFound, "gone");
    let pim_err: PimError = io_err.into();
    assert!(format!("{pim_err}").contains("gone"));
}