We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 558085d commit 207e7b9Copy full SHA for 207e7b9
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 906f1fc425a827d7bbbb87a6e86ce0aa7faf0bb8
+refs/heads/master: fc0bf125168ec3df75bc57c250a62d3ea225a546
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