sscanf 0.5.0

A sscanf (inverse of format!()) macro with near unlimited parsing capabilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fn main() {
    ///// Incorrect input type (usize) /////
    sscanf::sscanf!(5usize, "{usize}");
    //~             ^^^^^^ error: mismatched types
    //~                    label: expected `&str`, found `&usize`

    ///// Incorrect input type (bytes) /////
    sscanf::sscanf!(b"5", "{usize}");
    //~             ^^^^ error: mismatched types
    //~                  label: expected `&str`, found `&&[u8; 1]`

    ///// Temporary value (example from sscanf docs) /////
    sscanf::sscanf!(String::from("5"), "{usize}");
    //~             ^^^^^^^^^^^^^^^^^ error: temporary value dropped while borrowed
    //~                               label: creates a temporary value which is freed while still in use

    ////////////////////////////////////////////////////////////////////////////////
}