]> git.lizzy.rs Git - rust.git/commit
Recover error strings on Unix from_lossy_utf8
authorJubilee Young <workingjubilee@gmail.com>
Fri, 22 Jul 2022 15:50:31 +0000 (08:50 -0700)
committerJubilee Young <workingjubilee@gmail.com>
Fri, 22 Jul 2022 15:54:40 +0000 (08:54 -0700)
commitbcf780e2ba00dbe5a81502ef541dbc0f4fb76ebb
tree95cdf7f7be8a4846fa43305a5cdb898495000feb
parent246f66a905c2815f2c9b9c3d6b1e0649f3360ef8
Recover error strings on Unix from_lossy_utf8

Some language settings can result in unreliable UTF-8 being produced.
This can result in failing to emit the error string, panicking instead.
from_lossy_utf8 allows us to assume these strings usually will be fine.
library/std/src/sys/unix/os.rs