Skip to content

Commit

Permalink
Document CompactString has niches (#401)
Browse files Browse the repository at this point in the history
Add `assert_eq_size!` assertion.
  • Loading branch information
stepancheg authored Aug 20, 2024
1 parent 5c8b856 commit 0c9d2e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compact_str/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2686,3 +2686,4 @@ fn unwrap_with_msg_fail<E: fmt::Display>(error: E) -> ! {
}

static_assertions::assert_eq_size!(CompactString, String);
static_assertions::assert_eq_size!(Option<CompactString>, CompactString);

0 comments on commit 0c9d2e7

Please sign in to comment.