1
0
Fork 0
mirror of https://codeberg.org/icewind/bitbuffer.git synced 2026-06-03 08:34:07 +02:00

add main to readme example

This commit is contained in:
Robin Appelman 2025-05-23 23:27:02 +02:00
commit 4799d26f0b

View file

@ -52,6 +52,7 @@ struct ComplexType {
third: bool, third: bool,
} }
fn main() -> Result<(), Box<dyn std::error::Error>> {
let bytes = vec![ let bytes = vec![
0b1011_0101, 0b0110_1010, 0b1010_1100, 0b1001_1001, 0b1011_0101, 0b0110_1010, 0b1010_1100, 0b1001_1001,
0b1001_1001, 0b1001_1001, 0b1001_1001, 0b1110_0111 0b1001_1001, 0b1001_1001, 0b1001_1001, 0b1110_0111
@ -69,6 +70,7 @@ write_stream.write(&ComplexType {
second: 12, second: 12,
third: true third: true
})?; })?;
}
``` ```
## License ## License