From 896cfcc67fb8d3e53a5dcf138f79909891bf940e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 2 Jun 2014 15:49:42 -0700 Subject: std: Remove generics from Option::expect This commit removes the 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 --- src/libstd/slice.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'src/libstd/slice.rs') diff --git a/src/libstd/slice.rs b/src/libstd/slice.rs index 5753663dd87..ea42b77fb55 100644 --- a/src/libstd/slice.rs +++ b/src/libstd/slice.rs @@ -296,7 +296,6 @@ impl<'a, T: Clone> CloneableVector 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::()); -- cgit 1.4.1-3-g733a5