<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/memchr.rs, branch 1.24.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.24.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.24.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2017-08-24T16:42:53+00:00</updated>
<entry>
<title>Fix inconsistent doc headings</title>
<updated>2017-08-24T16:42:53+00:00</updated>
<author>
<name>lukaramu</name>
<email>lukaramu@users.noreply.github.com</email>
</author>
<published>2017-08-24T15:33:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=49ee9f3f08ba4583bc722a663e43551067ace271'/>
<id>urn:sha1:49ee9f3f08ba4583bc722a663e43551067ace271</id>
<content type='text'>
This fixes headings reading "Unsafety" and "Example", they should be
"Safety" and "Examples" according to RFC 1574.
</content>
</entry>
<entry>
<title>Removed as many "```ignore" as possible.</title>
<updated>2017-06-23T07:31:53+00:00</updated>
<author>
<name>kennytm</name>
<email>kennytm@gmail.com</email>
</author>
<published>2017-06-20T07:15:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4711982314ba33cab83704c26484b501c8652774'/>
<id>urn:sha1:4711982314ba33cab83704c26484b501c8652774</id>
<content type='text'>
Replaced by adding extra imports, adding hidden code (`# ...`), modifying
examples to be runnable (sorry Homura), specifying non-Rust code, and
converting to should_panic, no_run, or compile_fail.

Remaining "```ignore"s received an explanation why they are being ignored.
</content>
</entry>
<entry>
<title>std: Move platform specific memchr code into sys</title>
<updated>2016-10-01T19:33:02+00:00</updated>
<author>
<name>Brian Anderson</name>
<email>banderson@mozilla.com</email>
</author>
<published>2016-09-22T00:10:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fea1bd4cdf375fa097789b2484b746cacdfddb73'/>
<id>urn:sha1:fea1bd4cdf375fa097789b2484b746cacdfddb73</id>
<content type='text'>
</content>
</entry>
<entry>
<title>memrchr: Use a conditional instead of subtracting a complicated min</title>
<updated>2016-08-24T19:41:23+00:00</updated>
<author>
<name>Ulrik Sverdrup</name>
<email>bluss@users.noreply.github.com</email>
</author>
<published>2016-08-24T19:41:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8295c5056da0be355c86b29d1d4eed469920e73c'/>
<id>urn:sha1:8295c5056da0be355c86b29d1d4eed469920e73c</id>
<content type='text'>
This makes the critical calculation easier to understand.
</content>
</entry>
<entry>
<title>memrchr: Correct aligned offset computation</title>
<updated>2016-08-24T17:05:21+00:00</updated>
<author>
<name>Ulrik Sverdrup</name>
<email>bluss@users.noreply.github.com</email>
</author>
<published>2016-08-24T16:57:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d1ecee96bfb7fb52b67358302c524a8c0193dc23'/>
<id>urn:sha1:d1ecee96bfb7fb52b67358302c524a8c0193dc23</id>
<content type='text'>
The memrchr fallback did not compute the offset correctly. It was
intentioned to land on usize-aligned addresses but did not.
This was suspected to resulted in a crash on ARMv7 platform!

This bug affected non-linux platforms.

I think like this, if we have a slice with pointer `ptr` and length
`len`, we want to find the last usize-aligned offset in the slice.
The correct computation should be:

For example if ptr = 1 and len = 6, and size_of::&lt;usize&gt;() is 4:

[ x x x x x x ]
  1 2 3 4 5 6
        ^-- last aligned address at offset 3 from the start.

The last aligned address is ptr + len - (ptr + len) % usize_size.

Compute offset from the start as:

offset = len - (ptr + len) % usize_size = 6 - (1 + 6) % 4 = 6 - 3 = 3.

I believe the function's return value was always correct previously, if
the platform supported unaligned addresses.
</content>
</entry>
<entry>
<title>Fix a few typos in the code</title>
<updated>2016-07-03T08:02:24+00:00</updated>
<author>
<name>Sylvestre Ledru</name>
<email>sylvestre@debian.org</email>
</author>
<published>2016-07-03T08:00:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=872d107dea229fdeaae2cf3d904fb348d6f75dde'/>
<id>urn:sha1:872d107dea229fdeaae2cf3d904fb348d6f75dde</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Minor spelling fixes</title>
<updated>2016-02-09T16:52:39+00:00</updated>
<author>
<name>Carlos E. Garcia</name>
<email>carlos@cgarcia.org</email>
</author>
<published>2016-02-09T16:52:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=02aa0aff2f0b42368dd871186510493fa60d785a'/>
<id>urn:sha1:02aa0aff2f0b42368dd871186510493fa60d785a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: Use the fallback impl for memrchr on non-linux</title>
<updated>2016-01-20T17:00:34+00:00</updated>
<author>
<name>Ulrik Sverdrup</name>
<email>bluss@users.noreply.github.com</email>
</author>
<published>2016-01-20T16:59:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=078a6231a78a974eb19df884630edb8c65909941'/>
<id>urn:sha1:078a6231a78a974eb19df884630edb8c65909941</id>
<content type='text'>
This code was never used(!). This brings the memrchr improvements to
non-linux platforms (LineWriter / buffered stdout benefits).
</content>
</entry>
<entry>
<title>std: Stabilize APIs for the 1.7 release</title>
<updated>2016-01-16T19:03:10+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2016-01-15T18:07:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9a4f43b9b6558ab74b3e849a7770dc193bc1847b'/>
<id>urn:sha1:9a4f43b9b6558ab74b3e849a7770dc193bc1847b</id>
<content type='text'>
This commit stabilizes and deprecates the FCP (final comment period) APIs for
the upcoming 1.7 beta release. The specific APIs which changed were:

Stabilized

* `Path::strip_prefix` (renamed from `relative_from`)
* `path::StripPrefixError` (new error type returned from `strip_prefix`)
* `Ipv4Addr::is_loopback`
* `Ipv4Addr::is_private`
* `Ipv4Addr::is_link_local`
* `Ipv4Addr::is_multicast`
* `Ipv4Addr::is_broadcast`
* `Ipv4Addr::is_documentation`
* `Ipv6Addr::is_unspecified`
* `Ipv6Addr::is_loopback`
* `Ipv6Addr::is_unique_local`
* `Ipv6Addr::is_multicast`
* `Vec::as_slice`
* `Vec::as_mut_slice`
* `String::as_str`
* `String::as_mut_str`
* `&lt;[T]&gt;::clone_from_slice` - the `usize` return value is removed
* `&lt;[T]&gt;::sort_by_key`
* `i32::checked_rem` (and other signed types)
* `i32::checked_neg` (and other signed types)
* `i32::checked_shl` (and other signed types)
* `i32::checked_shr` (and other signed types)
* `i32::saturating_mul` (and other signed types)
* `i32::overflowing_add` (and other signed types)
* `i32::overflowing_sub` (and other signed types)
* `i32::overflowing_mul` (and other signed types)
* `i32::overflowing_div` (and other signed types)
* `i32::overflowing_rem` (and other signed types)
* `i32::overflowing_neg` (and other signed types)
* `i32::overflowing_shl` (and other signed types)
* `i32::overflowing_shr` (and other signed types)
* `u32::checked_rem` (and other unsigned types)
* `u32::checked_neg` (and other unsigned types)
* `u32::checked_shl` (and other unsigned types)
* `u32::saturating_mul` (and other unsigned types)
* `u32::overflowing_add` (and other unsigned types)
* `u32::overflowing_sub` (and other unsigned types)
* `u32::overflowing_mul` (and other unsigned types)
* `u32::overflowing_div` (and other unsigned types)
* `u32::overflowing_rem` (and other unsigned types)
* `u32::overflowing_neg` (and other unsigned types)
* `u32::overflowing_shl` (and other unsigned types)
* `u32::overflowing_shr` (and other unsigned types)
* `ffi::IntoStringError`
* `CString::into_string`
* `CString::into_bytes`
* `CString::into_bytes_with_nul`
* `From&lt;CString&gt; for Vec&lt;u8&gt;`
* `From&lt;CString&gt; for Vec&lt;u8&gt;`
* `IntoStringError::into_cstring`
* `IntoStringError::utf8_error`
* `Error for IntoStringError`

Deprecated

* `Path::relative_from` - renamed to `strip_prefix`
* `Path::prefix` - use `components().next()` instead
* `os::unix::fs` constants - moved to the `libc` crate
* `fmt::{radix, Radix, RadixFmt}` - not used enough to stabilize
* `IntoCow` - conflicts with `Into` and may come back later
* `i32::{BITS, BYTES}` (and other integers) - not pulling their weight
* `DebugTuple::formatter` - will be removed
* `sync::Semaphore` - not used enough and confused with system semaphores

Closes #23284
cc #27709 (still lots more methods though)
Closes #27712
Closes #27722
Closes #27728
Closes #27735
Closes #27729
Closes #27755
Closes #27782
Closes #27798
</content>
</entry>
<entry>
<title>Use memrchr bindings provided by libc</title>
<updated>2015-12-18T20:49:20+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2015-12-17T23:36:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a206e556d07134661eba5cbb0315fbd59c3e6717'/>
<id>urn:sha1:a206e556d07134661eba5cbb0315fbd59c3e6717</id>
<content type='text'>
</content>
</entry>
</feed>
