Skip to content

Commit 8863d37

Browse files
committed
manual fixups
1 parent 7c2bfd1 commit 8863d37

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

src/librbml/lib.rs

+19-6
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,15 @@ pub enum EbmlEncoderTag {
217217
const NUM_TAGS: usize = 0x1000;
218218
const NUM_IMPLICIT_TAGS: usize = 0x0e;
219219

220-
static TAG_IMPLICIT_LEN: [i8; NUM_IMPLICIT_TAGS] = [1, 2, 4, 8 /* EsU* */, 1, 2, 4,
221-
8 /* ESI* */, 1 /* EsBool */,
222-
4 /* EsChar */, 4, 8 /* EsF* */, 1,
223-
4 /* EsSub* */];
220+
#[cfg_attr(rustfmt, rustfmt_skip)]
221+
static TAG_IMPLICIT_LEN: [i8; NUM_IMPLICIT_TAGS] = [
222+
1, 2, 4, 8, // EsU*
223+
1, 2, 4, 8, // ESI*
224+
1, // EsBool
225+
4, // EsChar
226+
4, 8, // EsF*
227+
1, 4, // EsSub*
228+
];
224229

225230
#[derive(Debug)]
226231
pub enum Error {
@@ -1444,8 +1449,16 @@ mod tests {
14441449

14451450
#[test]
14461451
fn test_vuint_at() {
1447-
let data = &[0x80, 0xff, 0x40, 0x00, 0x7f, 0xff, 0x20, 0x00, 0x00, 0x3f, 0xff, 0xff, 0x10,
1448-
0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff];
1452+
let data = &[
1453+
0x80,
1454+
0xff,
1455+
0x40, 0x00,
1456+
0x7f, 0xff,
1457+
0x20, 0x00, 0x00,
1458+
0x3f, 0xff, 0xff,
1459+
0x10, 0x00, 0x00, 0x00,
1460+
0x1f, 0xff, 0xff, 0xff
1461+
];
14491462

14501463
let mut res: reader::Res;
14511464

src/librbml/opaque.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ use leb128::{read_signed_leb128, read_unsigned_leb128, write_signed_leb128, writ
1414
use std::io::{self, Write};
1515
use serialize;
1616

17-
// =-----------------------------------------------------------------------------
17+
// -----------------------------------------------------------------------------
1818
// Encoder
19-
// =-----------------------------------------------------------------------------
19+
// -----------------------------------------------------------------------------
2020

2121
pub struct Encoder<'a> {
2222
pub cursor: &'a mut io::Cursor<Vec<u8>>,
@@ -261,9 +261,9 @@ impl<'a> Encoder<'a> {
261261
}
262262
}
263263

264-
// =-----------------------------------------------------------------------------
264+
// -----------------------------------------------------------------------------
265265
// Decoder
266-
// =-----------------------------------------------------------------------------
266+
// -----------------------------------------------------------------------------
267267

268268
pub struct Decoder<'a> {
269269
pub data: &'a [u8],

0 commit comments

Comments
 (0)