use std::fmt;
fn main() {
let tado = Rustacean{name: "Tatesa", pronouns: &Pronouns::TheyThem, capitalise_pronouns: true, distro: "NixOS"};
println!("{tado}");
}
#[allow(dead_code)]
struct Rustacean<'a> {
name: &'a str,
pronouns: &'a Pronouns<'a>,
capitalise_pronouns: bool,
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)
}
}
Rust is the language of future.
- Slovakia
-
05:23
(UTC +01:00) - https://en.pronouns.page/@jantatesa
Pinned Loading
-
-
ratatui/ratatui
ratatui/ratatui PublicA Rust crate for cooking up terminal user interfaces (TUIs) 👨🍳🐀 https://ratatui.rs
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.