Rust: My horse doesn't pooping

Created on 12 Nov 2020  路  3Comments  路  Source: rust-lang/rust

I waited like 1 hours and my horse did not pooped.

Most helpful comment

do it like this

struct Horse;
struct Poop;
trait Animal { fn poop(&mut self) -> Poop { Poop } }
impl Animal for Horse { }

fn main() {
  let mut horse = Horse;
  horse.poop();
}

All 3 comments

Why you closed? It's not solved.

This is the issue tracker for the Rust programming language. It has nothing to do with horses or pooping.

do it like this

struct Horse;
struct Poop;
trait Animal { fn poop(&mut self) -> Poop { Poop } }
impl Animal for Horse { }

fn main() {
  let mut horse = Horse;
  horse.poop();
}
Was this page helpful?
0 / 5 - 0 ratings