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 44ffd8e commit e3a066bCopy full SHA for e3a066b
src/libstd/option.rs
@@ -70,7 +70,7 @@ Function: maybe
70
71
Applies a function to the contained value or returns a default
72
*/
73
-fn maybe<T, U>(def: U, f: block(T) -> U, opt: t<T>) -> U {
+fn maybe<T, U>(def: U, opt: t<T>, f: block(T) -> U) -> U {
74
alt opt { none. { def } some(t) { f(t) } }
75
}
76
@@ -80,7 +80,7 @@ Function: may
80
81
Performs an operation on the contained value or does nothing
82
83
-fn may<T>(f: block(T), opt: t<T>) {
+fn may<T>(opt: t<T>, f: block(T)) {
84
alt opt { none. {/* nothing */ } some(t) { f(t); } }
85
86
0 commit comments