Updated std::Option, std::Either and std::Result

- Made naming schemes consistent between Option, Result and Either
- Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None)
- Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
This commit is contained in:
Marvin Löbel 2013-08-04 01:59:24 +02:00
parent d8b299d179
commit 0ac7a219f0
115 changed files with 803 additions and 828 deletions

View file

@ -926,7 +926,7 @@ fn test_named_task() {
t.name(~"ada lovelace");
do t.spawn {
do with_task_name |name| {
assert!(name.get() == "ada lovelace");
assert!(name.unwrap() == "ada lovelace");
}
}
}