auto merge of #14610 : alexcrichton/rust/issue-14008, r=brson
This commit removes the <M: Any + Send> type parameter from Option::expect in favor of just taking a hard-coded `&str` argument. This allows this function to move into libcore. Previous code using strings with `expect` will continue to work, but code using this implicitly to transmit task failure will need to unwrap manually with a `match` statement. [breaking-change] Closes #14008
This commit is contained in:
commit
422d54bed2
12 changed files with 31 additions and 195 deletions
|
|
@ -296,7 +296,6 @@ impl<'a, T: Clone> CloneableVector<T> for &'a [T] {
|
|||
fn to_owned(&self) -> ~[T] {
|
||||
use RawVec = core::raw::Vec;
|
||||
use num::{CheckedAdd, CheckedMul};
|
||||
use option::Expect;
|
||||
|
||||
let len = self.len();
|
||||
let data_size = len.checked_mul(&mem::size_of::<T>());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue