Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub trait Patator {
- fn fire(&self) {
- println!("paf!")
- }
- }
- pub struct CarrotLauncher;
- impl Patator for CarrotLauncher {
- fn fire(&self) {
- print! {"pif-"};
- SuperPatator.fire()
- }
- }
- struct SuperPatator;
- impl Patator for SuperPatator {}
- fn main() {
- CarrotLauncher.fire()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement