rust/library/std
Matthias Krüger f337e28bd9
Rollup merge of #147773 - timvisee:docs-empty-is-ascii, r=Noratrieb
`is_ascii` on an empty string or slice returns true

Update the description of the [`is_ascii`](https://doc.rust-lang.org/std/primitive.str.html#method.is_ascii) functions - an empty string or slice also returns `true`.

This follows the pattern of [`all()`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.all). Clippy currently suggests to change `string.chars().all(|c| c.is_ascii())` into `string.is_ascii()`. This suggestion therefore seems fitting.

I've already questioned the behavior for this multiple times. I've always had to check the internals to conclude how it works. That's why I'm opening this PR to add it directly in the documentation.
2025-10-16 19:35:28 +02:00
..
benches Fix import in bench for wasm 2025-02-12 14:44:30 -08:00
src Rollup merge of #147773 - timvisee:docs-empty-is-ascii, r=Noratrieb 2025-10-16 19:35:28 +02:00
tests Rollup merge of #143191 - connortsui20:stabilize-rwlock-downgrade, r=tgross35 2025-10-15 23:41:00 +02:00
build.rs Add Motor OS std library port 2025-10-08 08:57:58 -07:00
Cargo.toml Rollup merge of #147000 - moturus:motor-os_stdlib_pr, r=tgross35 2025-10-16 19:35:23 +02:00