mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-25 21:28:07 +00:00
14 lines
159 B
Rust
14 lines
159 B
Rust
pub struct Bar {
|
|
x: u32,
|
|
}
|
|
|
|
impl Bar {
|
|
pub fn print(&self) {
|
|
println!("{}", self.x);
|
|
}
|
|
}
|
|
|
|
pub fn make_bar(x: u32) -> Bar {
|
|
Bar { x }
|
|
}
|