about summary refs log tree commit diff
path: root/src/libstd/task.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-04-15 23:36:58 -0700
committerbors <bors@rust-lang.org>2014-04-15 23:36:58 -0700
commit349d66af9420eeeeedfc648eb6ec3fd28015d4b3 (patch)
tree9789ea9a2b13b61b570bd896fe203a36bc08103c /src/libstd/task.rs
parent74bd2338eb25d0d165458a09d7aab3d2ecb98c48 (diff)
parentc18c9284b352f3605553343cd78c7a8eb75b5cd2 (diff)
downloadrust-349d66af9420eeeeedfc648eb6ec3fd28015d4b3.tar.gz
rust-349d66af9420eeeeedfc648eb6ec3fd28015d4b3.zip
auto merge of #13532 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/task.rs')
-rw-r--r--src/libstd/task.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libstd/task.rs b/src/libstd/task.rs
index ed10f6d15cd..df627809ea0 100644
--- a/src/libstd/task.rs
+++ b/src/libstd/task.rs
@@ -257,8 +257,8 @@ pub fn try<T:Send>(f: proc():Send -> T) -> Result<T, ~Any:Send> {
 pub fn with_task_name<U>(blk: |Option<&str>| -> U) -> U {
     use rt::task::Task;
 
-    let mut task = Local::borrow(None::<Task>);
-    match task.get().name {
+    let task = Local::borrow(None::<Task>);
+    match task.name {
         Some(ref name) => blk(Some(name.as_slice())),
         None => blk(None)
     }
@@ -276,11 +276,8 @@ pub fn deschedule() {
 
 pub fn failing() -> bool {
     //! True if the running task has failed
-
     use rt::task::Task;
-
-    let mut local = Local::borrow(None::<Task>);
-    local.get().unwinder.unwinding()
+    Local::borrow(None::<Task>).unwinder.unwinding()
 }
 
 // The following 8 tests test the following 2^3 combinations: