We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76daca2 commit cc850ecCopy full SHA for cc850ec
library/core/src/str/mod.rs
@@ -2431,6 +2431,7 @@ impl AsRef<[u8]> for str {
2431
#[stable(feature = "rust1", since = "1.0.0")]
2432
impl Default for &str {
2433
/// Creates an empty str
2434
+ #[inline]
2435
fn default() -> Self {
2436
""
2437
}
@@ -2439,6 +2440,7 @@ impl Default for &str {
2439
2440
#[stable(feature = "default_mut_str", since = "1.28.0")]
2441
impl Default for &mut str {
2442
/// Creates an empty mutable str
2443
2444
2445
// SAFETY: The empty string is valid UTF-8.
2446
unsafe { from_utf8_unchecked_mut(&mut []) }
0 commit comments