You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stop circumventing the std definition of FromUtf8Error
By already taking the `Vec<u8>` out of this error we leave
users no choice to bubble up the error with typical `?` or
`anyhow::Context::context()`, because `vec<u8>` does not implement
`std::error::Error` (it's not an error after all).
Instead of trying to outsmart the standard library and annoying the
user, return the original `FromUtf8Error` *as it is*, leaving the
caller to deal with it however they please (i.e. bubble it up, or
call `into_bytes()` themselves if they wish to continue parsing it
otherwise).
Copy file name to clipboardExpand all lines: tests/compile-fail/socket-thread-unsafe.stderr
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ error[E0277]: `*mut c_void` cannot be shared between threads safely
9
9
15 | | });
10
10
| |_____^ `*mut c_void` cannot be shared between threads safely
11
11
|
12
-
= help: within `Socket`, the trait `Sync` is not implemented for `*mut c_void`, which is required by `{closure@$DIR/tests/compile-fail/socket-thread-unsafe.rs:13:27: 13:34}: Send`
12
+
= help: within `Socket`, the trait `Sync` is not implemented for `*mut c_void`
13
13
note: required because it appears within the type `Socket`
0 commit comments