We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa0eb5d commit 0bd1186Copy full SHA for 0bd1186
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 679c2d25a1bfc425cafa984851b2f50c30e8ebe9
+refs/heads/master: d9c664e3fabe50fcf8fadf127d4519b6d7ce595a
trunk/src/lib/option.rs
@@ -2,8 +2,8 @@
3
tag t<@T> { none; some(T); }
4
5
-fn get<@T>(opt: t<T>) -> T {
6
- alt opt { some(x) { x } none. { fail "option none" } }
+fn get<@T>(opt: t<T>) -> &T {
+ alt opt { some(x) { ret x; } none. { fail "option none"; } }
7
}
8
9
fn map<@T, @U>(f: block(T) -> U, opt: t<T>) -> t<U> {
0 commit comments