Skip to content

Commit 8f3a9a1

Browse files
authored
Rollup merge of #163216 - sorairolake:inline-nonzero-from-str, r=Darksonn
Add `inline` attribute to `NonZero::from_str` `<integer>::from_str`, `T::from_str_radix`, `T::from_ascii_bytes`, and `T::from_ascii_bytes_radix` has the `inline` attribute, buy `NonZero::from_str` does not.
2 parents b8cf7cf + 6cc4e7e commit 8f3a9a1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎library/core/src/num/nonzero.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,6 +1449,7 @@ macro_rules! nonzero_integer {
14491449
///
14501450
#[doc = concat!("assert!(NonZero::<", stringify!($Int), ">::from_str(\"1 \").is_err());")]
14511451
/// ```
1452+
#[inline]
14521453
fn from_str(src: &str) -> Result<Self, Self::Err> {
14531454
Self::from_str_radix(src, 10)
14541455
}

0 commit comments

Comments
 (0)