Skip to content

Commit

Permalink
warn for UB on bit shifting
Browse files Browse the repository at this point in the history
  • Loading branch information
density215 committed Dec 12, 2023
1 parent 1da2697 commit 6c2c160
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/af.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl AddressFamily for IPv4 {
/// // prefix nibble
/// ```
///
/// # Panics
/// # Panics in debug mode!
///
/// Will panic if there is insufficient space to add the given nibble,
/// i.e. if `len + nibble_len >= 32`.
Expand Down Expand Up @@ -187,8 +187,10 @@ impl AddressFamily for IPv6 {
/// // prefix nibble
/// ```
///
/// # Panics
/// # Panics only in debug mode!
///
/// In release mode this will be UB (Undefined Behaviour)!
///
/// Will panic if there is insufficient space to add the given nibble,
/// i.e. if `len + nibble_len >= 128`.
///
Expand Down

0 comments on commit 6c2c160

Please sign in to comment.