Skip to content

Commit

Permalink
Bump version for bad replacebits! comments
Browse files Browse the repository at this point in the history
  • Loading branch information
merehap committed Oct 21, 2024
1 parent 21033e7 commit 3d18a3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "splitbits"
version = "0.1.1"
version = "0.1.2"
edition = "2021"
license = "BSD-3-Clause"
authors = ["Sean Erle Johnson"]
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ pub fn splithex_then_combine(input: proc_macro::TokenStream) -> proc_macro::Toke
/// let original: u8 = 0b00001000;
///
/// let a: u8 = 0b01100001;
/// // Compiles to: ((a << 1) & 0b01111110) | (target & 0b10000001)
/// // Compiles to: ((a << 1) & 0b01111110) | (original & 0b10000001)
/// let replaced = replacebits!(original, ".aaaaaa.");
/// assert_eq!(replaced, 0b01000010);
/// ```
Expand All @@ -958,7 +958,7 @@ pub fn splithex_then_combine(input: proc_macro::TokenStream) -> proc_macro::Toke
/// let original: u8 = 0b00001000;
///
/// let a: u8 = 0b01100001;
/// // Compiles to: ((a << 1) & 0b01111110) | (target & 0b10000001)
/// // Compiles to: ((a << 1) & 0b01111110) | (original & 0b10000001)
/// let replaced = replacebits!(overflow=truncate, original, ".aaaaaa.");
/// assert_eq!(replaced, 0b01000010);
/// ```
Expand All @@ -976,7 +976,7 @@ pub fn splithex_then_combine(input: proc_macro::TokenStream) -> proc_macro::Toke
/// let original: u8 = 0b00001000;
///
/// let a: u8 = 0b01100001;
/// // Compiles to: (a << 1) | (target & 0b10000001)
/// // Compiles to: (a << 1) | (original & 0b10000001)
/// let replaced = replacebits!(overflow=corrupt, original, ".aaaaaa.");
/// // The most significant bit is replaced, despite the template indicating that should not be,
/// // due to an invalidly large value assigned to "a" by the caller.
Expand All @@ -991,7 +991,7 @@ pub fn splithex_then_combine(input: proc_macro::TokenStream) -> proc_macro::Toke
/// let original: u8 = 0b00001000;
///
/// let a: u8 = 0b01100001;
/// // Compiles to: min(a << 1, 0b01111110) | (target & 0b10000001)
/// // Compiles to: min(a << 1, 0b01111110) | (original & 0b10000001)
/// let replaced = replacebits!(overflow=saturate, original, ".aaaaaa.");
/// assert_eq!(replaced, 0b01111110);
/// ```
Expand Down

0 comments on commit 3d18a3d

Please sign in to comment.