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
\xXX is very misleading in Rust since it actually works exactly like \u00XX instead of the way it works in C, C++ and other languages. Example:
// this FAILS because left is [195, 191]assert_eq!( bytes!("\xFF"), bytes!(255));// this SUCCEEDSassert_eq!( bytes!("\xFF"), bytes!("\u00FF"));
I understand the reasoning behind this (Rust strings are always UTF-8), but then \xXX shouldn't exist in the language. It brings nothing but confusion and it's functionality as implemented is the same as \u00XX.