about summary refs log tree commit diff
path: root/library/core/src/str/iter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src/str/iter.rs')
-rw-r--r--library/core/src/str/iter.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/str/iter.rs b/library/core/src/str/iter.rs
index 4d6239e11a3..d2180fa83fb 100644
--- a/library/core/src/str/iter.rs
+++ b/library/core/src/str/iter.rs
@@ -8,7 +8,7 @@ use crate::iter::{TrustedRandomAccess, TrustedRandomAccessNoCoerce};
 use crate::ops::Try;
 use crate::option;
 use crate::slice::{self, Split as SliceSplit};
-use core::num::NonZeroUsize;
+use core::num::{NonZero, NonZeroUsize};
 
 use super::from_utf8_unchecked;
 use super::pattern::Pattern;
@@ -96,7 +96,7 @@ impl<'a> Iterator for Chars<'a> {
             unsafe { self.iter.advance_by(slurp).unwrap_unchecked() };
         }
 
-        NonZeroUsize::new(remainder).map_or(Ok(()), Err)
+        NonZero::<usize>::new(remainder).map_or(Ok(()), Err)
     }
 
     #[inline]