Skip to content

Commit

Permalink
tweak safety comment
Browse files Browse the repository at this point in the history
  • Loading branch information
meadowsys committed Sep 19, 2024
1 parent 4cc4ea4 commit 4b21109
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ impl GermanString {

/// # Safety
///
/// `self` must be inline.
/// Conservatively marked `unsafe`, `inline` variant has no initialisation
/// requirements as long as the first byte is initialised, which all
/// constructors of this struct guarantee.
#[inline]
unsafe fn to_inline_unchecked(&self) -> &Inline {
// SAFETY: caller promises the string is stored inline
Expand Down

0 comments on commit 4b21109

Please sign in to comment.