<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_serialize/src, branch 1.71.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.71.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.71.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-05-14T22:59:11+00:00</updated>
<entry>
<title>Fix the `FileEncoder` buffer size.</title>
<updated>2023-05-14T22:59:11+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-05-02T03:19:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f2df861c7f35d8fe25ff9a2e9188ad90f8262188'/>
<id>urn:sha1:f2df861c7f35d8fe25ff9a2e9188ad90f8262188</id>
<content type='text'>
It allows a variable size, but in practice we always use the default of
8192 bytes. This commit fixes it to that size, which makes things
slightly faster because the size can be hard-wired in generated code.

The commit also:
- Rearranges some buffer capacity checks so they're all in the same form
  (`x &gt; BUFSIZE`).
- Removes some buffer capacity assertions and comments about them. With
  an 8192 byte buffer, we're not in any danger of overflowing a `usize`.
</content>
</entry>
<entry>
<title>Factor out more repeated code in `{write,read}_leb128!`.</title>
<updated>2023-05-04T03:52:14+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-05-04T03:10:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=723ca2a33df3774914abc68a8ab79238904ef067'/>
<id>urn:sha1:723ca2a33df3774914abc68a8ab79238904ef067</id>
<content type='text'>
Make them generate the entire function, not just the function body.
</content>
</entry>
<entry>
<title>Rename `file_encoder_write_leb128!`.</title>
<updated>2023-05-04T03:51:20+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-05-04T02:55:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4ac959a3c083dcd3c6536c26513b26ff891abfe6'/>
<id>urn:sha1:4ac959a3c083dcd3c6536c26513b26ff891abfe6</id>
<content type='text'>
`MemEncoder` was recently removed, leaving `FileEncoder` as the only
encoder. So this prefix is no longer needed, and `write_leb128!` matches
the existing `read_leb128!`.
</content>
</entry>
<entry>
<title>Reorder some `MemDecoder` methods.</title>
<updated>2023-05-04T03:11:51+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-05-01T06:06:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=58002faca0ac45589c6092030a5459eae9720e3d'/>
<id>urn:sha1:58002faca0ac45589c6092030a5459eae9720e3d</id>
<content type='text'>
So they match the order in the `Decoder` trait.
</content>
</entry>
<entry>
<title>Remove a low value comment.</title>
<updated>2023-05-04T00:42:42+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-05-01T06:40:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b71ce293e843f17e27bd2868981dead23691019e'/>
<id>urn:sha1:b71ce293e843f17e27bd2868981dead23691019e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `MemEncoder`.</title>
<updated>2023-05-02T02:02:32+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-05-01T08:51:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ebee3f8515c6f5189b69ae56919ab5bba934aabe'/>
<id>urn:sha1:ebee3f8515c6f5189b69ae56919ab5bba934aabe</id>
<content type='text'>
It's only used in tests. Which is bad, because it means that
`FileEncoder` is used in the compiler but isn't used in tests!

`tests/opaque.rs` now tests encoding/decoding round-trips via file.
Because this is slower than memory, this commit also adjusts the
`u16`/`i16` tests so they are more like the `u32`/`i32` tests, i.e. they
don't test every possible value.
</content>
</entry>
<entry>
<title>Remove `MemDecoder::read_byte`.</title>
<updated>2023-04-28T08:34:55+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-04-27T23:16:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a676dfa888b3d14abfa5d9b9a1045f8c1bde6793'/>
<id>urn:sha1:a676dfa888b3d14abfa5d9b9a1045f8c1bde6793</id>
<content type='text'>
It's just a synonym for `read_u8`.
</content>
</entry>
<entry>
<title>Add some provided methods to `Encoder`/`Decoder`.</title>
<updated>2023-04-28T08:34:54+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-04-27T23:06:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7a16d25365b5f0aa815948237c46fb1843386d7a'/>
<id>urn:sha1:7a16d25365b5f0aa815948237c46fb1843386d7a</id>
<content type='text'>
The methods for `i8`, `bool`, `char`, `str` are the same for all impls,
because they layered on top of other methods.
</content>
</entry>
<entry>
<title>Remove a low-value assertion.</title>
<updated>2023-04-28T08:34:52+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-04-27T23:01:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fa133f5354ac29096d1577d5ba9c1400c2ad3b0f'/>
<id>urn:sha1:fa133f5354ac29096d1577d5ba9c1400c2ad3b0f</id>
<content type='text'>
Checking that `read_raw_bytes(len)` changes the position by `len` is a
reasonable thing for a test, but isn't much use in just one of the
zillion `Decodable` impls.
</content>
</entry>
<entry>
<title>Add a comment explaining the lack of `Decoder::read_enum_variant`.</title>
<updated>2023-04-27T23:51:00+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-04-27T22:53:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=37c9e45186e00c197902a7c7349c18383aa0abf7'/>
<id>urn:sha1:37c9e45186e00c197902a7c7349c18383aa0abf7</id>
<content type='text'>
Because I was wondering about it, and this may save a future person from
also wondering.
</content>
</entry>
</feed>
