diff options
| author | bors <bors@rust-lang.org> | 2014-03-12 19:21:44 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-12 19:21:44 -0700 |
| commit | a53242a1a38301b4a40be71fcd182568b7ee91b6 (patch) | |
| tree | 86001b14271c4107e54f73af6a7fe50db580c7b5 /src/libstd | |
| parent | 2eebeb81372e320510a1c1e2eef96eb5146a1e1f (diff) | |
| parent | f079c94f723f8c67319da8c727324b2011d7b36f (diff) | |
| download | rust-a53242a1a38301b4a40be71fcd182568b7ee91b6.tar.gz rust-a53242a1a38301b4a40be71fcd182568b7ee91b6.zip | |
auto merge of #12756 : pongad/rust/remove_owned_str_pat, r=alexcrichton
match-drop-strs-issue-4541.rs deleted as it's the same with issue-4541.rs
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/local_data.rs | 4 | ||||
| -rw-r--r-- | src/libstd/task.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/local_data.rs b/src/libstd/local_data.rs index 6b854daabda..9fc635647f3 100644 --- a/src/libstd/local_data.rs +++ b/src/libstd/local_data.rs @@ -398,8 +398,8 @@ mod tests { } }); modify(my_key, |data| { - match data { - Some(~"first data") => Some(~"next data"), + match data.as_ref().map(|s| s.as_slice()) { + Some("first data") => Some(~"next data"), Some(ref val) => fail!("wrong value: {}", *val), None => fail!("missing value") } diff --git a/src/libstd/task.rs b/src/libstd/task.rs index 1de5322b157..16ac46186df 100644 --- a/src/libstd/task.rs +++ b/src/libstd/task.rs @@ -387,8 +387,8 @@ fn test_back_to_the_future_result() { fn test_try_success() { match try(proc() { ~"Success!" - }) { - result::Ok(~"Success!") => (), + }).as_ref().map(|s| s.as_slice()) { + result::Ok("Success!") => (), _ => fail!() } } |
