Is there a way to use the Unicode tables in the Rust regex crate to match a single char without turning it into a String or &str? It seems like the internals must have a way to do this, but perhaps not exposed? Is there a trick?
You could read the data into a new fixed size UTF8 stack array (doing the conversion) and then read it into the &str.
-
-
What is the lifetime of your &str? Where does it point to?
-
Couldn't you stack allocate another four bytes (or 8 if needed) and unsafely write into it after validating?
-
I would suggest trying to write the code. The nature of Twitter prevents me from understanding where you've gone wrong. :-)
-
+1 I've been travelling through this entire convo so I haven't had a chance yet.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.