Fix test failures: correct EBML size assertion, fix doc tests
- Fix write_size test: 127 encodes as [0x40, 0x7F] not [0xC0, 0x7F] - Mark doc examples as ignore (use incomplete pseudo-code)
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
//! The app registers a callback to receive them.
|
//! The app registers a callback to receive them.
|
||||||
//! No display logic, no English text — just data.
|
//! No display logic, no English text — just data.
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust,ignore
|
||||||
//! disc.rip(&mut session, 0, output, |event| {
|
//! disc.rip(&mut session, 0, output, |event| {
|
||||||
//! match event.kind {
|
//! match event.kind {
|
||||||
//! EventKind::BytesRead { bytes, total } => update_progress(bytes, total),
|
//! EventKind::BytesRead { bytes, total } => update_progress(bytes, total),
|
||||||
|
|||||||
+1
-1
@@ -234,7 +234,7 @@ mod tests {
|
|||||||
|
|
||||||
buf.clear();
|
buf.clear();
|
||||||
write_size(&mut buf, 127).unwrap();
|
write_size(&mut buf, 127).unwrap();
|
||||||
assert_eq!(buf, [0xC0, 127]); // 127 >= 0x7F, uses 2 bytes
|
assert_eq!(buf, [0x40, 127]); // 127 >= 0x7F, uses 2 bytes: (0>>8)|0x40, 127
|
||||||
|
|
||||||
buf.clear();
|
buf.clear();
|
||||||
write_size(&mut buf, 126).unwrap();
|
write_size(&mut buf, 126).unwrap();
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//! MkvStream — a Write adapter that demuxes BD-TS and writes MKV.
|
//! MkvStream — a Write adapter that demuxes BD-TS and writes MKV.
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust,ignore
|
||||||
//! let output = MkvStream::new(file)
|
//! let output = MkvStream::new(file)
|
||||||
//! .title(&disc.titles[0])
|
//! .title(&disc.titles[0])
|
||||||
//! .max_buffer(20 * 1024 * 1024);
|
//! .max_buffer(20 * 1024 * 1024);
|
||||||
|
|||||||
Reference in New Issue
Block a user