Skip to content

Commit 1cd2b30

Browse files
committed
---
yaml --- r: 3169 b: refs/heads/master c: 0efd7fa h: refs/heads/master i: 3167: 00683a1 v: v3
1 parent ee3096a commit 1cd2b30

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 49a4867da6ba4ef1f6ee4977b243acc0953dda25
2+
refs/heads/master: 0efd7fac8a3dbcf7c8bd19ea2ace05e4898bafae

trunk/src/lib/option.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ fn is_none[T](&t[T] opt) -> bool {
2121
ret alt (opt) { case (none) { true } case (some(_)) { false } };
2222
}
2323

24+
fn is_some[T](&t[T] opt) -> bool {
25+
ret !is_none(opt);
26+
}
27+
2428
fn from_maybe[T](&T def, &t[T] opt) -> T {
2529
auto f = bind util::id[T](_);
2630
ret maybe[T, T](def, f, opt);

0 commit comments

Comments
 (0)