use std::fmt;
fn main() {
let tado = Rustacean{name: "Tadeas", pronouns: &Pronouns::HeHim, distro: "Opensuse"};
println!("{tado}");
}
#[allow(dead_code)]
struct Rustacean<'a> {
name: &'a str,
pronouns: &'a Pronouns<'a>,
distro: &'a str,
}
#[allow(dead_code)]
enum Pronouns<'a> {
HeHim,
SheHer,
TheyThem,
ItIts,
Other(&'a str),
}
impl fmt::Display for Rustacean<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Hi! I am {}, and use {} BTW!", self.name, self.distro)
}
}
Block or Report
Block or report TadoTheMiner
Report abuse
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abusePinned
-
-
-
-
ratatui-org/ratatui
ratatui-org/ratatui PublicRust library that's all about cooking up terminal user interfaces (TUIs) 👨🍳🐀
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.