about summary refs log tree commit diff
path: root/src/libuuid/lib.rs
diff options
context:
space:
mode:
authorKevin Butler <haqkrs@gmail.com>2014-05-26 02:32:04 +0100
committerKevin Butler <haqkrs@gmail.com>2014-05-30 17:55:41 +0100
commited5bf6621e9bdea92b026f438eb7b88bcc85860e (patch)
tree4c6f704d227924e634d4cb1403a2c18c4f3fb757 /src/libuuid/lib.rs
parent3faa6762c18333154961029393fdc5e58636be66 (diff)
lib{serialize, uuid}: Fix snake case errors.
A number of functions/methods have been moved or renamed to align
better with rust standard conventions.

serialize::ebml::reader::Doc => seriaize::ebml::Doc::new
serialize::ebml::reader::Decoder => Decoder::new
serialize::ebml::writer::Encoder => Encoder::new

[breaking-change]
Diffstat (limited to 'src/libuuid/lib.rs')
-rw-r--r--src/libuuid/lib.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libuuid/lib.rs b/src/libuuid/lib.rs
index 8263fcda314..c157d83ced1 100644
--- a/src/libuuid/lib.rs
+++ b/src/libuuid/lib.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -795,14 +795,16 @@ mod test {
 
     #[test]
     fn test_serialize_round_trip() {
-        use serialize::ebml;
+        use serialize::ebml::Doc;
+        use serialize::ebml::writer::Encoder;
+        use serialize::ebml::reader::Decoder;
         use serialize::{Encodable, Decodable};
 
         let u = Uuid::new_v4();
         let mut wr = MemWriter::new();
-        let _ = u.encode(&mut ebml::writer::Encoder(&mut wr));
-        let doc = ebml::reader::Doc(wr.get_ref());
-        let u2 = Decodable::decode(&mut ebml::reader::Decoder(doc)).unwrap();
+        let _ = u.encode(&mut Encoder::new(&mut wr));
+        let doc = Doc::new(wr.get_ref());
+        let u2 = Decodable::decode(&mut Decoder::new(doc)).unwrap();
         assert_eq!(u, u2);
     }