about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-01-19 17:55:34 -0800
committerPatrick Walton <pcwalton@mimiga.net>2012-01-19 18:04:24 -0800
commit194d8e3bd55021a2f0e6d61c2bdc2c0b2017f58f (patch)
treee76727dac06a0470097bcf532279dbae564037d8 /src/libstd
parent874390831a61d0708f227bfc5a78fd167ea6d9c1 (diff)
downloadrust-194d8e3bd55021a2f0e6d61c2bdc2c0b2017f58f.tar.gz
rust-194d8e3bd55021a2f0e6d61c2bdc2c0b2017f58f.zip
lib: ";" to "," in enums
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/deque.rs4
-rw-r--r--src/libstd/extfmt.rs58
-rw-r--r--src/libstd/getopts.rs28
-rw-r--r--src/libstd/io.rs10
-rw-r--r--src/libstd/json.rs12
-rw-r--r--src/libstd/list.rs4
-rw-r--r--src/libstd/net.rs2
-rw-r--r--src/libstd/rope.rs8
-rw-r--r--src/libstd/test.rs8
9 files changed, 67 insertions, 67 deletions
diff --git a/src/libstd/deque.rs b/src/libstd/deque.rs
index b5f46732cfc..5ab9a44cd1a 100644
--- a/src/libstd/deque.rs
+++ b/src/libstd/deque.rs
@@ -241,10 +241,10 @@ mod tests {
         assert (e(deq.get(3), d));
     }
 
-    enum taggy { one(int); two(int, int); three(int, int, int); }
+    enum taggy { one(int), two(int, int), three(int, int, int), }
 
     enum taggypar<T> {
-        onepar(int); twopar(int, int); threepar(int, int, int);
+        onepar(int), twopar(int, int), threepar(int, int, int),
     }
 
     type reccy = {x: int, y: int, t: taggy};
diff --git a/src/libstd/extfmt.rs b/src/libstd/extfmt.rs
index 441ff01a3c1..a34c1d27f96 100644
--- a/src/libstd/extfmt.rs
+++ b/src/libstd/extfmt.rs
@@ -39,31 +39,31 @@ import option::{some, none};
 
 // Functions used by the fmt extension at compile time
 mod ct {
-    enum signedness { signed; unsigned; }
-    enum caseness { case_upper; case_lower; }
+    enum signedness { signed, unsigned, }
+    enum caseness { case_upper, case_lower, }
     enum ty {
-        ty_bool;
-        ty_str;
-        ty_char;
-        ty_int(signedness);
-        ty_bits;
-        ty_hex(caseness);
-        ty_octal;
-        ty_float;
+        ty_bool,
+        ty_str,
+        ty_char,
+        ty_int(signedness),
+        ty_bits,
+        ty_hex(caseness),
+        ty_octal,
+        ty_float,
         // FIXME: More types
     }
     enum flag {
-        flag_left_justify;
-        flag_left_zero_pad;
-        flag_space_for_sign;
-        flag_sign_always;
-        flag_alternate;
+        flag_left_justify,
+        flag_left_zero_pad,
+        flag_space_for_sign,
+        flag_sign_always,
+        flag_alternate,
     }
     enum count {
-        count_is(int);
-        count_is_param(int);
-        count_is_next_param;
-        count_implied;
+        count_is(int),
+        count_is_param(int),
+        count_is_next_param,
+        count_implied,
     }
 
     // A formatted conversion from an expression to a string
@@ -76,7 +76,7 @@ mod ct {
 
 
     // A fragment of the output sequence
-    enum piece { piece_string(str); piece_conv(conv); }
+    enum piece { piece_string(str), piece_conv(conv), }
     type error_fn = fn@(str) -> ! ;
 
     fn parse_fmt_string(s: str, error: error_fn) -> [piece] {
@@ -261,20 +261,20 @@ mod ct {
 // implement it this way, I think.
 mod rt {
     enum flag {
-        flag_left_justify;
-        flag_left_zero_pad;
-        flag_space_for_sign;
-        flag_sign_always;
-        flag_alternate;
+        flag_left_justify,
+        flag_left_zero_pad,
+        flag_space_for_sign,
+        flag_sign_always,
+        flag_alternate,
 
 
         // FIXME: This is a hack to avoid creating 0-length vec exprs,
         // which have some difficulty typechecking currently. See
         // comments in front::extfmt::make_flags
-        flag_none;
+        flag_none,
     }
-    enum count { count_is(int); count_implied; }
-    enum ty { ty_default; ty_bits; ty_hex_upper; ty_hex_lower; ty_octal; }
+    enum count { count_is(int), count_implied, }
+    enum ty { ty_default, ty_bits, ty_hex_upper, ty_hex_lower, ty_octal, }
 
     // FIXME: May not want to use a vector here for flags;
     // instead just use a bool per flag
@@ -384,7 +384,7 @@ mod rt {
 
         ret str::unsafe_from_bytes(svec);
     }
-    enum pad_mode { pad_signed; pad_unsigned; pad_nozero; }
+    enum pad_mode { pad_signed, pad_unsigned, pad_nozero, }
     fn pad(cv: conv, s: str, mode: pad_mode) -> str {
         let uwidth;
         alt cv.width {
diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs
index 29df5770a17..6c21ec1330e 100644
--- a/src/libstd/getopts.rs
+++ b/src/libstd/getopts.rs
@@ -65,11 +65,11 @@ export opt_strs;
 export opt_maybe_str;
 export opt_default;
 
-enum name { long(str); short(char); }
+enum name { long(str), short(char), }
 
-enum hasarg { yes; no; maybe; }
+enum hasarg { yes, no, maybe, }
 
-enum occur { req; optional; multi; }
+enum occur { req, optional, multi, }
 
 /*
 Type: opt
@@ -130,7 +130,7 @@ fn optmulti(name: str) -> opt {
     ret {name: mkname(name), hasarg: yes, occur: multi};
 }
 
-enum optval { val(str); given; }
+enum optval { val(str), given, }
 
 /*
 Type: match
@@ -159,11 +159,11 @@ The type returned when the command line does not conform to the
 expected format. Pass this value to <fail_str> to get an error message.
 */
 enum fail_ {
-    argument_missing(str);
-    unrecognized_option(str);
-    option_missing(str);
-    option_duplicated(str);
-    unexpected_argument(str);
+    argument_missing(str),
+    unrecognized_option(str),
+    option_missing(str),
+    option_duplicated(str),
+    unexpected_argument(str),
 }
 
 /*
@@ -382,11 +382,11 @@ mod tests {
     import result::{err, ok};
 
     enum fail_type {
-        argument_missing_;
-        unrecognized_option_;
-        option_missing_;
-        option_duplicated_;
-        unexpected_argument_;
+        argument_missing_,
+        unrecognized_option_,
+        option_missing_,
+        option_duplicated_,
+        unexpected_argument_,
     }
 
     fn check_fail_type(f: fail_, ft: fail_type) {
diff --git a/src/libstd/io.rs b/src/libstd/io.rs
index eca266ecfa9..6331e57ea7d 100644
--- a/src/libstd/io.rs
+++ b/src/libstd/io.rs
@@ -17,7 +17,7 @@ native mod rustrt {
 // Reading
 
 // FIXME This is all buffered. We might need an unbuffered variant as well
-enum seek_style { seek_set; seek_end; seek_cur; }
+enum seek_style { seek_set, seek_end, seek_cur, }
 
 
 // The raw underlying reader iface. All readers must implement this.
@@ -264,7 +264,7 @@ fn string_reader(s: str) -> reader {
 
 
 // Writing
-enum fileflag { append; create; truncate; none; }
+enum fileflag { append, create, truncate, none, }
 
 // FIXME: Seekable really should be orthogonal.
 // FIXME: eventually u64
@@ -497,15 +497,15 @@ mod fsync {
 
     enum level {
         // whatever fsync does on that platform
-        fsync;
+        fsync,
 
         // fdatasync on linux, similiar or more on other platforms
-        fdatasync;
+        fdatasync,
 
         // full fsync
         //
         // You must additionally sync the parent directory as well!
-        fullfsync;
+        fullfsync,
     }
 
 
diff --git a/src/libstd/json.rs b/src/libstd/json.rs
index 5b7523e03fd..0229b4d1b22 100644
--- a/src/libstd/json.rs
+++ b/src/libstd/json.rs
@@ -25,17 +25,17 @@ Represents a json value.
 */
 enum json {
     /* Variant: num */
-    num(float);
+    num(float),
     /* Variant: string */
-    string(str);
+    string(str),
     /* Variant: boolean */
-    boolean(bool);
+    boolean(bool),
     /* Variant: list */
-    list(@[json]);
+    list(@[json]),
     /* Variant: dict */
-    dict(map::map<str,json>);
+    dict(map::map<str,json>),
     /* Variant: null */
-    null;
+    null,
 }
 
 /*
diff --git a/src/libstd/list.rs b/src/libstd/list.rs
index 3286127bb1b..b05f895c327 100644
--- a/src/libstd/list.rs
+++ b/src/libstd/list.rs
@@ -15,9 +15,9 @@ Tag: list
 */
 enum list<T> {
     /* Variant: cons */
-    cons(T, @list<T>);
+    cons(T, @list<T>),
     /* Variant: nil */
-    nil;
+    nil,
 }
 
 /*Section: Operations */
diff --git a/src/libstd/net.rs b/src/libstd/net.rs
index e73eed27864..706221d95c2 100644
--- a/src/libstd/net.rs
+++ b/src/libstd/net.rs
@@ -18,7 +18,7 @@ enum ip_addr {
 
     An IPv4 address
     */
-    ipv4(u8, u8, u8, u8);
+    ipv4(u8, u8, u8, u8),
 }
 
 /* Section: Operations */
diff --git a/src/libstd/rope.rs b/src/libstd/rope.rs
index 54d22dde3a2..eb30897b1c0 100644
--- a/src/libstd/rope.rs
+++ b/src/libstd/rope.rs
@@ -586,8 +586,8 @@ mod node {
        content - A non-empty rope
     */
     enum root {
-        empty;
-        content(@node);
+        empty,
+        content(@node),
     }
 
     /*
@@ -689,8 +689,8 @@ mod node {
     concat - The concatenation of two ropes
     */
     enum node {
-        leaf(leaf);
-        concat(concat);
+        leaf(leaf),
+        concat(concat),
     }
 
     /*
diff --git a/src/libstd/test.rs b/src/libstd/test.rs
index 7fc63c015ee..707e4cf153f 100644
--- a/src/libstd/test.rs
+++ b/src/libstd/test.rs
@@ -83,7 +83,7 @@ fn parse_opts(args: [str]) : vec::is_not_empty(args) -> opt_res {
     ret either::left(test_opts);
 }
 
-enum test_result { tr_ok; tr_failed; tr_ignored; }
+enum test_result { tr_ok, tr_failed, tr_ignored, }
 
 // A simple console test runner
 fn run_tests_console(opts: test_opts,
@@ -186,9 +186,9 @@ fn run_tests_console(opts: test_opts,
 fn use_color() -> bool { ret get_concurrency() == 1u; }
 
 enum testevent {
-    te_filtered([test_desc]);
-    te_wait(test_desc);
-    te_result(test_desc, test_result);
+    te_filtered([test_desc]),
+    te_wait(test_desc),
+    te_result(test_desc, test_result),
 }
 
 type monitor_msg = (test_desc, test_result);