Skip to content

Commit

Permalink
sl-std: impl Default for &ascii::Str
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwuelker committed Jun 30, 2024
1 parent cbce648 commit 383033c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/sl-std/src/ascii/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,13 @@ impl PartialEq<str> for Str {
}
}

impl<'a> Default for &'a Str {
/// Create an empty [Str]
fn default() -> Self {
Str::EMPTY
}
}

macro_rules! slice_index_impl {
($for: ty) => {
unsafe impl SliceIndex<Str> for $for {
Expand Down

0 comments on commit 383033c

Please sign in to comment.