kazuyahaine ๐
2026-04-08 20:16 ๐ฌ๐ง
use std::fmt::{Display, Formatter};
struct HelloWorld;
impl Display for HelloWorld {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f,"Hello world!")
}
}
fn main() {
println!("{HelloWorld}")
}
struct HelloWorld;
impl Display for HelloWorld {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f,"Hello world!")
}
}
fn main() {
println!("{HelloWorld}")
}
0