3 ms·
fn tail<'a>(s: &'a [u8]) -> &'a [u8] { &s[1..] } ... fn main() -> Result<(), std::str::Utf8Error> { let s = std::str::from_utf8(&[240
by mstaoru 3y ago
fn tail<'a>(s: &'a [u8]) -> &'a [u8] {
&s[1..]
}
...
fn main() -> Result<(), std::str::Utf8Error> {
let s = std::str::from_utf8(&[240, 159, 141, 137])?;
println!("{}", s);
Ok(())
}
Sorry, `|::|&(_Rust!){}?`. I know you're sexy. But I'll prefer my eyesight and sanity over you.
- dureuill 3y agoAs someone with bad eyesight, Rust has been very legible, and the sigils actually help for that (in the same way as most mathematical notations make formulae easier to parse). It does take a little while to get accustomed to, but the investment is more than worth it. Can't comment on my sanity though.