BurntSushi / rust-snappy

Snappy compression implemented in Rust (including the Snappy frame format).
BSD 3-Clause "New" or "Revised" License
444 stars 43 forks source link

Remove trailing semicolon from fail! macro #39

Closed Aaron1011 closed 3 years ago

Aaron1011 commented 3 years ago

If the semicolon_in_expressions_from_macros lint is ever turned into a hard error, your crate will stop compiling. This commit ensures that your crate will compile on both current and future versions of Rust.

See rust-lang/rust#79813 for more details

Aaron1011 commented 3 years ago

This allows the macro to be used in expression position (e.g. if true { fail!() } or match true { true => fail!(), _ => {} }) in addition to statement position.

BurntSushi commented 3 years ago

This PR is on crates.io in snap 1.0.4.