aboutsummaryrefslogtreecommitdiff
path: root/src/lib/util.rs
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-11-03 17:10:37 -0700
committerPatrick Walton <[email protected]>2010-11-05 11:18:40 -0700
commitadb1754e4dcbf61abb93ac7604aed4e8bca080a8 (patch)
tree037acbf63e189a999291e04a9a9db4e777e9c003 /src/lib/util.rs
parentrustboot: Report cyclic import errors at the right location (diff)
downloadrust-adb1754e4dcbf61abb93ac7604aed4e8bca080a8.tar.xz
rust-adb1754e4dcbf61abb93ac7604aed4e8bca080a8.zip
Move the option type to its own module
Diffstat (limited to 'src/lib/util.rs')
-rw-r--r--src/lib/util.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/lib/util.rs b/src/lib/util.rs
index f6e1327b..72844d5f 100644
--- a/src/lib/util.rs
+++ b/src/lib/util.rs
@@ -1,21 +1,3 @@
-tag option[T] {
- none;
- some(T);
-}
-
-type operator[T, U] = fn(&T) -> U;
-
-fn option_map[T, U](&operator[T, U] f, &option[T] opt) -> option[U] {
- alt (opt) {
- case (some[T](?x)) {
- ret some[U](f(x));
- }
- case (none[T]) {
- ret none[U];
- }
- }
-}
-
fn id[T](&T x) -> T {
ret x;
}