Amazed at how well this works really.pic.twitter.com/h55RuLdmya
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
For anyone wondering: "what am I looking at?" It's a state machine for a traffic light, checked at compile time. Green -> Yellow -> Red -> Green by triggering the "next" event on it (e.g. calling a method).
if your states have no storage, I think you can use phantomdata: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b992e929ba7f935061559580bcca7b3b … This does make the `dbg!` pretty useless, though; you'd probably need to implement some sort of static `name` method for the states for printing
Empty structs are still zero sized! This means all of the types in this example, even the nested ones, are still zsts
Someone improved this with const generics. See the thread here https://www.reddit.com/r/rust/comments/fvciq3/-/fmhpasp … I cannot wait for const generics to be stable.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.