-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: run mdbook tests #109
CI: run mdbook tests #109
Conversation
fn format(&self, f: &mut Formatter) { | ||
binfmt::write!(f, "{:u8}", self) | ||
fn format(&self, f: &mut binfmt::Formatter) { | ||
binfmt::export::write!(f, "{:u8}", self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should really be removed, but I don't really know what to put there instead, since it's all private
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is part of the implementation notes so we can just say that these APIs are implementation details and shouldn't be used from libraries / applications.
or we instead of an impl
in a rust
code block we can use a text
block that says this is how a u8
's Format
's implementation looks on the wire: showing only the array of bytes [1, the_u8_value]
book/src/ser-str.md
Outdated
``` rust | ||
binfmt::error!("Hello, {:str}!", [b'w', b'o', b'r', b'l', b'd']); | ||
<!-- TODO remove ',ignore' --> | ||
``` rust,ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should work / pass now I think
book/src/format.md
Outdated
@@ -2,14 +2,20 @@ | |||
|
|||
To implement the `Format` trait for a struct or enum use the `derive` attribute. | |||
|
|||
``` rust | |||
<!-- TODO remove ',ignore' --> | |||
``` rust,ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should work / pass now I think
book/src/istr.md
Outdated
@@ -5,21 +5,25 @@ Compared to the `{:str}` parameter, which transmits a complete string, `{:istr}` | |||
The `{:istr}` parameter expects an argument with type `binfmt::Str`. | |||
A `Str` value is created using the `intern!` macro; the argument to this macro must be a string literal. | |||
|
|||
``` rust | |||
<!-- TODO remove ',ignore' --> | |||
``` rust,ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should work / pass now I think
book/src/ser-array.md
Outdated
@@ -2,7 +2,9 @@ | |||
|
|||
For arrays (`{:[u8; N]}`) the length is not serialized. | |||
|
|||
``` rust | |||
<!-- TODO remove ',ignore' --> | |||
``` rust,ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should work / pass now I think
book/src/ser-integers.md
Outdated
@@ -3,7 +3,9 @@ | |||
Integers will be serialized in little endian order using `to_le_bytes()`. | |||
`usize` and `isize` values will be subject to LEB128 compression. | |||
|
|||
``` rust | |||
<!-- TODO remove ',ignore' --> | |||
``` rust,ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should work / pass now I think
Revival of #62