Skip to content

Commit bc4e33e

Browse files
committed
Add #[inline] to Arguments::as_str().
1 parent e73a23f commit bc4e33e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/fmt/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ impl<'a> Arguments<'a> {
439439
/// assert_eq!(format_args!("{}", 1).as_str(), None);
440440
/// ```
441441
#[unstable(feature = "fmt_as_str", issue = "none")]
442+
#[inline]
442443
pub fn as_str(&self) -> Option<&'a str> {
443444
if self.args.is_empty() && self.pieces.len() == 1 { Some(self.pieces[0]) } else { None }
444445
}

0 commit comments

Comments
 (0)