We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 207e7b9 commit e8273edCopy full SHA for e8273ed
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: fc0bf125168ec3df75bc57c250a62d3ea225a546
+refs/heads/master: d1c27ba9e06e08e1dc27b493144e467d0efd526c
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) { ret x; } none. { fail "option none"; } }
+fn get<@T>(opt: t<T>) -> T {
+ alt opt { some(x) { x } none. { fail "option none" } }
7
}
8
9
fn map<@T, @U>(f: block(T) -> U, opt: t<T>) -> t<U> {
0 commit comments