Skip to content

Commit

Permalink
start
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkMyCar committed Jun 9, 2024
1 parent 8bee76b commit 3a88419
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions compact_str/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,20 @@ impl CompactString {
CompactString(Repr::const_new(text))
}

/// Creates a new inline [`CompactString`] at compile time.
#[deprecated(since = "0.8.0", note = "replaced by CompactString::const_new")]
#[inline]
pub const fn new_inline(text: &'static str) -> Self {
CompactString::const_new(text)
}

/// Creates a new inline [`CompactString`] from `&'static str` at compile time.
#[deprecated(since = "0.8.0", note = "replaced by CompactString::const_new")]
#[inline]
pub const fn from_static_str(text: &'static str) -> Self {
CompactString::const_new(text)
}

/// Get back the `&'static str` constructed by [`CompactString::const_new`].
///
/// If the string was short enough that it could be inlined, then it was inline, and
Expand Down

0 comments on commit 3a88419

Please sign in to comment.