diff options
| author | Baoshan <pangbw@gmail.com> | 2019-08-20 15:43:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-20 15:43:55 -0700 |
| commit | 0c8a14c7fb34d6edbc2b24495bb0774aeae27b98 (patch) | |
| tree | 49f35638545ccd98762e91fc712d09533ad869e5 /src/liballoc/string.rs | |
| parent | 7ab6fa09143f87414485e25cfc29727f5d1f0b8a (diff) | |
| parent | bea0372a1a7a31b81f28cc4d9a83a2dc9a79d008 (diff) | |
| download | rust-0c8a14c7fb34d6edbc2b24495bb0774aeae27b98.tar.gz rust-0c8a14c7fb34d6edbc2b24495bb0774aeae27b98.zip | |
Merge pull request #6 from rust-lang/master
rebase code from rust-lang/rust master branch
Diffstat (limited to 'src/liballoc/string.rs')
| -rw-r--r-- | src/liballoc/string.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index eca726cd410..b65f191836e 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -56,7 +56,7 @@ use core::ptr; use core::str::{pattern::Pattern, lossy}; use crate::borrow::{Cow, ToOwned}; -use crate::collections::CollectionAllocErr; +use crate::collections::TryReserveError; use crate::boxed::Box; use crate::str::{self, from_boxed_utf8_unchecked, FromStr, Utf8Error, Chars}; use crate::vec::Vec; @@ -937,9 +937,9 @@ impl String { /// /// ``` /// #![feature(try_reserve)] - /// use std::collections::CollectionAllocErr; + /// use std::collections::TryReserveError; /// - /// fn process_data(data: &str) -> Result<String, CollectionAllocErr> { + /// fn process_data(data: &str) -> Result<String, TryReserveError> { /// let mut output = String::new(); /// /// // Pre-reserve the memory, exiting if we can't @@ -953,7 +953,7 @@ impl String { /// # process_data("rust").expect("why is the test harness OOMing on 4 bytes?"); /// ``` #[unstable(feature = "try_reserve", reason = "new API", issue="48043")] - pub fn try_reserve(&mut self, additional: usize) -> Result<(), CollectionAllocErr> { + pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError> { self.vec.try_reserve(additional) } @@ -975,9 +975,9 @@ impl String { /// /// ``` /// #![feature(try_reserve)] - /// use std::collections::CollectionAllocErr; + /// use std::collections::TryReserveError; /// - /// fn process_data(data: &str) -> Result<String, CollectionAllocErr> { + /// fn process_data(data: &str) -> Result<String, TryReserveError> { /// let mut output = String::new(); /// /// // Pre-reserve the memory, exiting if we can't @@ -991,7 +991,7 @@ impl String { /// # process_data("rust").expect("why is the test harness OOMing on 4 bytes?"); /// ``` #[unstable(feature = "try_reserve", reason = "new API", issue="48043")] - pub fn try_reserve_exact(&mut self, additional: usize) -> Result<(), CollectionAllocErr> { + pub fn try_reserve_exact(&mut self, additional: usize) -> Result<(), TryReserveError> { self.vec.try_reserve_exact(additional) } |
