Files
rust/library/std/src
Dylan DPC a42e62fa0a Rollup merge of #83353 - m-ou-se:io-error-avoid-alloc, r=nagisa
Add internal io::Error::new_const to avoid allocations.

This makes it possible to have a io::Error containing a message with zero allocations, and uses that everywhere to avoid the *three* allocations involved in `io::Error::new(kind, "message")`.

The function signature isn't perfect, because it needs a reference to the `&str`. So for now, this is just a `pub(crate)` function. Later, we'll be able to use `fn new_const<MSG: &'static str>(kind: ErrorKind)` to make that a bit better. (Then we'll also be able to use some ZST trickery if that would result in more efficient code.)

See https://github.com/rust-lang/rust/issues/83352
2021-03-24 01:52:29 +01:00
..
2021-02-06 13:05:56 +01:00
2021-03-16 17:43:33 -04:00
2020-11-07 16:15:48 +01:00
2020-10-21 20:44:03 -07:00
2021-01-07 09:13:21 +01:00
2020-09-02 17:37:40 -04:00
2021-01-23 11:56:33 -06:00
2021-02-26 19:03:44 +01:00
2021-02-26 19:03:44 +01:00
2021-03-20 00:36:41 -04:00
2021-02-28 12:57:38 -08:00
2021-03-19 19:45:42 -05:00
2021-02-23 15:54:55 +01:00
2021-02-13 16:59:06 +01:00
2020-11-22 17:11:41 -05:00