]> git.lizzy.rs Git - rust.git/commitdiff
manual fixups
authorNick Cameron <ncameron@mozilla.com>
Tue, 19 Jan 2016 01:39:23 +0000 (14:39 +1300)
committerNick Cameron <ncameron@mozilla.com>
Tue, 19 Jan 2016 01:39:23 +0000 (14:39 +1300)
src/librbml/lib.rs
src/librbml/opaque.rs

index e9e6d8bf1fbb60ffdf383a6cfdefecb233e32bcb..913314c4899a2260c69eb34c8cd5bb3c07440fb0 100644 (file)
@@ -217,10 +217,15 @@ pub enum EbmlEncoderTag {
 const NUM_TAGS: usize = 0x1000;
 const NUM_IMPLICIT_TAGS: usize = 0x0e;
 
-static TAG_IMPLICIT_LEN: [i8; NUM_IMPLICIT_TAGS] = [1, 2, 4, 8 /* EsU* */, 1, 2, 4,
-                                                    8 /* ESI* */, 1 /* EsBool */,
-                                                    4 /* EsChar */, 4, 8 /* EsF* */, 1,
-                                                    4 /* EsSub* */];
+#[cfg_attr(rustfmt, rustfmt_skip)]
+static TAG_IMPLICIT_LEN: [i8; NUM_IMPLICIT_TAGS] = [
+    1, 2, 4, 8, // EsU*
+    1, 2, 4, 8, // ESI*
+    1, // EsBool
+    4, // EsChar
+    4, 8, // EsF*
+    1, 4, // EsSub*
+];
 
 #[derive(Debug)]
 pub enum Error {
@@ -1444,8 +1449,16 @@ mod tests {
 
     #[test]
     fn test_vuint_at() {
-        let data = &[0x80, 0xff, 0x40, 0x00, 0x7f, 0xff, 0x20, 0x00, 0x00, 0x3f, 0xff, 0xff, 0x10,
-                     0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff];
+        let data = &[
+            0x80,
+            0xff,
+            0x40, 0x00,
+            0x7f, 0xff,
+            0x20, 0x00, 0x00,
+            0x3f, 0xff, 0xff,
+            0x10, 0x00, 0x00, 0x00,
+            0x1f, 0xff, 0xff, 0xff
+        ];
 
         let mut res: reader::Res;
 
index bed266ae1ccf5293a50588d78e58f933604d647b..531a25dc1b766d8047e0e4ee47bd8a044e8825b1 100644 (file)
@@ -14,9 +14,9 @@
 use std::io::{self, Write};
 use serialize;
 
-// =-----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Encoder
-// =-----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 
 pub struct Encoder<'a> {
     pub cursor: &'a mut io::Cursor<Vec<u8>>,
@@ -261,9 +261,9 @@ pub fn from_rbml<'b: 'c, 'c>(rbml: &'c mut ::writer::Encoder<'b>) -> Encoder<'c>
     }
 }
 
-// =-----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 // Decoder
-// =-----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
 
 pub struct Decoder<'a> {
     pub data: &'a [u8],