home.social

#rustcatastructures — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #rustcatastructures, aggregated by home.social.

fetched live
  1. use gc::Trace;

    Now that cats approve of Rust's garbage collection, it means that it's really established.

    Pictured: Baghera, @imperio 's cat.

    #RustCataStructures #rust #RustLang #cat #CatsOfMastodon #Caturday

  2. struct Hat();

    struct ChristmasCat (
    either::Either::<Hat, Hat>,
    );

    impl ChristmasCat {

    fn hunt(&mut self) {
    if !self.0.is_left() && !self.0.is_right() {
    unreachable!()
    }
    }
    }

    Original by @catsalad : infosec.exchange/@catsalad/113

    #RustCataStructures #rust #RustLang #cat #CatsOfMastodon

  3. impl WashingMachine {
    pub fn spin(&self, bowl: &mut Option<Box<Cat>>) {
    while !self.done {
    self.tub.rotate(1);
    if let Some(ref mut bowl) = bowl {
    bowl >>= 1;
    }
    }
    }
    }

    Original by @catsalad : infosec.exchange/@catsalad/113

    #RustCataStructures #Caturday #Rust #RustLang #cat #cats #CatsOfMastodon