Skip to content
This repository was archived by the owner on Mar 25, 2024. It is now read-only.

Commit 52de1e0

Browse files
committed
Fix Serializer example code on rustc pre-1.47
error[E0277]: arrays only have std trait implementations for lengths 0..=32 --> src/ser.rs:30:5 | 18 | assert_eq!(buffer, b"---\nk: 107\n...\n---\nj: 106\nk: 107\n"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[u8; 33]` | = note: required because of the requirements on the impl of `std::cmp::PartialEq<&[u8; 33]>` for `std::vec::Vec<u8>` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
1 parent 5b91abf commit 52de1e0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/ser.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ use yaml_rust::{yaml, Yaml, YamlEmitter};
2424
/// object.insert("k", 107);
2525
/// object.serialize(&mut ser)?;
2626
///
27-
/// object.insert("j", 106);
27+
/// object.insert("J", 74);
2828
/// object.serialize(&mut ser)?;
2929
///
30-
/// assert_eq!(buffer, b"---\nk: 107\n...\n---\nj: 106\nk: 107\n");
30+
/// assert_eq!(buffer, b"---\nk: 107\n...\n---\nJ: 74\nk: 107\n");
3131
/// Ok(())
3232
/// }
3333
/// ```

0 commit comments

Comments
 (0)