55
[BLOG] Why Rust mutexes look like they do - Cliffle
(cliffle.com)
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Credits
That's exactly what's done above using an extension trait! You can
mutex_val.ulock()
with it!That's why you're told (clippy does that i think) to use
expect
instead, so you can signal "whatever string" you want to signal precisely.Exactly! My code has a handful of "expect()" calls in it, and each one self-documents why it's okay. It's like a comment, but it appears in logs if it ever triggers.