<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libcore/str/mod.rs, branch 1.37.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.37.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.37.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2019-06-10T10:42:43+00:00</updated>
<entry>
<title>make sure to_ascii_lowercase actually leaves upper-case non-ASCII characters alone</title>
<updated>2019-06-10T10:42:43+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2019-06-10T10:42:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7b97cf94315983bc032e92209b6f00a518262460'/>
<id>urn:sha1:7b97cf94315983bc032e92209b6f00a518262460</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add examples for make_ascii_{uppercase, lowercase}</title>
<updated>2019-06-09T00:28:29+00:00</updated>
<author>
<name>Napen123</name>
<email>napen123@gmail.com</email>
</author>
<published>2019-06-09T00:28:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1b6b7597ed96815d9944f8c77eaffb18daece20c'/>
<id>urn:sha1:1b6b7597ed96815d9944f8c77eaffb18daece20c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Revert "Add implementations of last in terms of next_back on a bunch of DoubleEndedIterators."</title>
<updated>2019-05-22T21:09:34+00:00</updated>
<author>
<name>Steven Fackler</name>
<email>sfackler@palantir.com</email>
</author>
<published>2019-05-22T21:09:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8a22bc3b30e81568db25cf57aa9e7629bfa449c7'/>
<id>urn:sha1:8a22bc3b30e81568db25cf57aa9e7629bfa449c7</id>
<content type='text'>
This reverts commit 3e86cf36b5114f201868bf459934fe346a76a2d4.
</content>
</entry>
<entry>
<title>Rollup merge of #60443 - RalfJung:as_ptr, r=SimonSapin</title>
<updated>2019-05-14T20:00:11+00:00</updated>
<author>
<name>Mazdak Farrokhzad</name>
<email>twingoow@gmail.com</email>
</author>
<published>2019-05-14T20:00:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=088c99410b8516a4fc639507ab6c27184875d005'/>
<id>urn:sha1:088c99410b8516a4fc639507ab6c27184875d005</id>
<content type='text'>
as_ptr returns a read-only pointer

Add comments to `as_ptr` methods to warn that these are read-only pointers, and writing to them is UB.

[It was pointed out](https://internals.rust-lang.org/t/as-ptr-vs-as-mut-ptr/9940) that `CStr` does not even have an `as_mut_ptr`. I originally was going to add one, but there is no method at all that would mutate a `CStr`. Was that a deliberate choice or should I add an `as_mut_ptr` (similar to [what I did for `str`](https://github.com/rust-lang/rust/pull/58200))?
</content>
</entry>
<entry>
<title>Rollup merge of #60130 - khuey:efficient_last, r=sfackler</title>
<updated>2019-05-14T20:00:09+00:00</updated>
<author>
<name>Mazdak Farrokhzad</name>
<email>twingoow@gmail.com</email>
</author>
<published>2019-05-14T20:00:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bab03cecfeadcbc79ee2aead61c4de973e5649a0'/>
<id>urn:sha1:bab03cecfeadcbc79ee2aead61c4de973e5649a0</id>
<content type='text'>
Add implementations of last in terms of next_back on a bunch of DoubleEndedIterators

Provided a `DoubleEndedIterator` has finite length, `Iterator::last` is equivalent to `DoubleEndedIterator::next_back`. But searching forwards through the iterator when it's unnecessary is obviously not good for performance. I ran into this on one of the collection iterators.

I tried adding appropriate overloads for a bunch of the iterator adapters like filter, map, etc, but I ran into a lot of type inference failures after doing so.

The other interesting case is what to do with `Repeat`. Do we consider it part of the contract that `Iterator::last` will loop forever on it? The docs do say that the iterator will be evaluated until it returns None. This is also relevant for the adapters, it's trivially easy to observe whether a `Map` adapter invoked its closure a zillion times or just once for the last element.
</content>
</entry>
<entry>
<title>clarify wording</title>
<updated>2019-05-02T11:36:30+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2019-05-02T11:36:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=30cf0e4251533e67603c755acee5b0bd56197fce'/>
<id>urn:sha1:30cf0e4251533e67603c755acee5b0bd56197fce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>as_ptr returns a read-only pointer</title>
<updated>2019-05-01T15:59:48+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2019-05-01T15:59:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1e47250540bc97f921d1b7e2982f1904fa191dff'/>
<id>urn:sha1:1e47250540bc97f921d1b7e2982f1904fa191dff</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #60356 - JohnTitor:stabilize-as-mut-ptr, r=Centril</title>
<updated>2019-04-29T20:22:42+00:00</updated>
<author>
<name>Mazdak Farrokhzad</name>
<email>twingoow@gmail.com</email>
</author>
<published>2019-04-29T20:22:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c9b70144a365656b2f16a983bda57b66e978c058'/>
<id>urn:sha1:c9b70144a365656b2f16a983bda57b66e978c058</id>
<content type='text'>
Stabilize str::as_mut_ptr

Closes #58215
</content>
</entry>
<entry>
<title>Rollup merge of #59946 - mernen:patch-2, r=ehuss</title>
<updated>2019-04-29T20:22:34+00:00</updated>
<author>
<name>Mazdak Farrokhzad</name>
<email>twingoow@gmail.com</email>
</author>
<published>2019-04-29T20:22:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=eb3c53071a8e403ea98292f99f520439473ed409'/>
<id>urn:sha1:eb3c53071a8e403ea98292f99f520439473ed409</id>
<content type='text'>
Fix equivalent string in escape_default docs

This newline should be escaped.
</content>
</entry>
<entry>
<title>Stabilize str::as_mut_ptr</title>
<updated>2019-04-28T17:33:50+00:00</updated>
<author>
<name>Yuki OKUSHI</name>
<email>huyuumi.dev@gmail.com</email>
</author>
<published>2019-04-28T17:33:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4c0f01cc27a8ba8f86c7356f36bd94e437d32a39'/>
<id>urn:sha1:4c0f01cc27a8ba8f86c7356f36bd94e437d32a39</id>
<content type='text'>
</content>
</entry>
</feed>
