66cac1f3e9
* Handle pub(restricted) This commit properly handles pub(restricted) as introduced in RFC 1422 [0]. The syntax support was added in #971, but they were not correctly formatted. [0] https://github.com/rust-lang/rfcs/blob/master/text/1422-pub-restricted.md Fixes #970 * Drop #[inline] attribute on format_visibility * Make newly non-failing functions return String The change to `format_visibiilty` means that `format_header` and `format_unit_struct` can no longer fail. Their return type is updated to reflect that.
52 lines
1.0 KiB
Rust
52 lines
1.0 KiB
Rust
pub( super ) enum WriteState<D> {
|
|
WriteId {
|
|
id: U64Writer,
|
|
size: U64Writer,
|
|
payload: Option<Writer<D>>,
|
|
},
|
|
WriteSize {
|
|
size: U64Writer,
|
|
payload: Option<Writer<D>>,
|
|
},
|
|
WriteData(Writer<D>),
|
|
}
|
|
|
|
pub( crate ) enum WriteState<D> {
|
|
WriteId {
|
|
id: U64Writer,
|
|
size: U64Writer,
|
|
payload: Option<Writer<D>>,
|
|
},
|
|
WriteSize {
|
|
size: U64Writer,
|
|
payload: Option<Writer<D>>,
|
|
},
|
|
WriteData(Writer<D>),
|
|
}
|
|
|
|
pub( ::global:: path :: to::some_mod ) enum WriteState<D> {
|
|
WriteId {
|
|
id: U64Writer,
|
|
size: U64Writer,
|
|
payload: Option<Writer<D>>,
|
|
},
|
|
WriteSize {
|
|
size: U64Writer,
|
|
payload: Option<Writer<D>>,
|
|
},
|
|
WriteData(Writer<D>),
|
|
}
|
|
|
|
pub( local:: path :: to::some_mod ) enum WriteState<D> {
|
|
WriteId {
|
|
id: U64Writer,
|
|
size: U64Writer,
|
|
payload: Option<Writer<D>>,
|
|
},
|
|
WriteSize {
|
|
size: U64Writer,
|
|
payload: Option<Writer<D>>,
|
|
},
|
|
WriteData(Writer<D>),
|
|
}
|