1
Fork 0
This commit is contained in:
Nicholas Nethercote 2022-06-10 08:35:03 +10:00
parent 15f5622a53
commit 7f51a1b976
23 changed files with 140 additions and 123 deletions

View file

@ -1911,13 +1911,13 @@ impl_pos! {
pub struct CharPos(pub usize);
}
impl<S: Encoder> Encodable<S> for BytePos {
impl<S: rustc_serialize::Encoder> Encodable<S> for BytePos {
fn encode(&self, s: &mut S) {
s.emit_u32(self.0);
}
}
impl<D: Decoder> Decodable<D> for BytePos {
impl<D: rustc_serialize::Decoder> Decodable<D> for BytePos {
fn decode(d: &mut D) -> BytePos {
BytePos(d.read_u32())
}