about summary refs log tree commit diff
path: root/src/libstd/os.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-06-02 15:49:42 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-03 17:19:56 -0700
commit896cfcc67fb8d3e53a5dcf138f79909891bf940e (patch)
treedf4433cee95ca769c9dc664a63455bcc5f42c166 /src/libstd/os.rs
parentb981add9ee56a2d6dc11aa48f01aac5d0dda9327 (diff)
downloadrust-896cfcc67fb8d3e53a5dcf138f79909891bf940e.tar.gz
rust-896cfcc67fb8d3e53a5dcf138f79909891bf940e.zip
std: Remove generics from Option::expect
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
Diffstat (limited to 'src/libstd/os.rs')
-rw-r--r--src/libstd/os.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index fa0116b2482..486d98a5487 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -85,7 +85,6 @@ pub fn getcwd() -> Path {
 pub fn getcwd() -> Path {
     use libc::DWORD;
     use libc::GetCurrentDirectoryW;
-    use option::Expect;
 
     let mut buf = [0 as u16, ..BUF_BYTES];
     unsafe {
@@ -101,7 +100,7 @@ pub fn getcwd() -> Path {
 pub mod win32 {
     use libc::types::os::arch::extra::DWORD;
     use libc;
-    use option::{None, Option, Expect};
+    use option::{None, Option};
     use option;
     use os::TMPBUF_SZ;
     use slice::{MutableVector, ImmutableVector};
@@ -924,7 +923,6 @@ fn real_args() -> Vec<String> {
 #[cfg(windows)]
 fn real_args() -> Vec<String> {
     use slice;
-    use option::Expect;
 
     let mut nArgs: c_int = 0;
     let lpArgCount: *mut c_int = &mut nArgs;