Chubercik / i48

`i48` provides a 48-bit signed integer type for Rust, filling the gap between `i32` and `i64`. This type may be useful in certain scenarios where 48-bit precision is required but 64 bits would be excessive.
https://crates.io/crates/i48
MIT License
0 stars 0 forks source link

release `1.1.0` breaks semver #4

Open Vrtgs opened 3 weeks ago

Vrtgs commented 3 weeks ago

a crate depending on i48 = "1" can arbitrarily fail to compile

Chubercik commented 3 weeks ago

How so? The crate's API did not change (only the internal structure of i48), I don't see how that would break semver.

Vrtgs commented 3 weeks ago
pub struct i48 {
    /// The raw byte representation of the 48-bit integer.
    pub data: [u16; 3],
}
pub struct i48 {
    /// The raw byte representation of the 48-bit integer.
    pub data: [u8; 6],
}

see how data is marked pub 🙃 the structure is not so internal anymore this may compile let x = i48 { data: [0; 3] } this also may misscompile let x = i48 { data: [0; 6] }