diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-03-21 20:22:38 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2021-03-21 20:22:38 +0100 |
| commit | 7b71719faf5ba6a230d097fddb288f79ccc570f1 (patch) | |
| tree | 73e747cd70df4cf394414d1894096d1fd759667a /library/std/src/net/mod.rs | |
| parent | 96783625a0a2906d70690a5d76f83b1ccc028434 (diff) | |
| download | rust-7b71719faf5ba6a230d097fddb288f79ccc570f1.tar.gz rust-7b71719faf5ba6a230d097fddb288f79ccc570f1.zip | |
Use io::Error::new_const everywhere to avoid allocations.
Diffstat (limited to 'library/std/src/net/mod.rs')
| -rw-r--r-- | library/std/src/net/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/net/mod.rs b/library/std/src/net/mod.rs index d4b1552fec5..d814e9b25ba 100644 --- a/library/std/src/net/mod.rs +++ b/library/std/src/net/mod.rs @@ -88,6 +88,6 @@ where } } Err(last_err.unwrap_or_else(|| { - Error::new(ErrorKind::InvalidInput, "could not resolve to any addresses") + Error::new_const(ErrorKind::InvalidInput, &"could not resolve to any addresses") })) } |
