Skip to main content

Search

Items tagged with: RustCataStructures


let floor = Floor::default();<br>let mut bowl = Bowl::new();<br>let mut cat = Cat::mew();<br><br>bowl.place_on(&floor);<br>cat.sit_on(&bowl);<br><br>let floor: &mut Floor = unsafe {<br>    &mut *(&floor as *const Floor as *mut Floor)<br>};<br><br>floor.lower_by(50 * CM);<br>

Levitation needs some unsafe code, but not around the cat, cats don't take fall damage.

Original post by @Kyu : meow.social/@Kyu/1095710305682…

#RustCataStructures #rust #RustLang #cat #CatsOfMastodon


Not all cats have the gift of levitation.
Those that do, however, do like to flaunt it.


railing[i-1..=i+2].copy_from_slice(&[cat.tail, cat.hind_legs, cat.front_legs, cat.head]);<br>

#RustCataStructures #rust #RustLang #RustLanguage #cat #CatsOfMastodon


let four_cats: Vec<(Cat, Color)> = vec![rand::random::(Cat, Color); 4];<br>let cats = [vec![rand::random::(Cat, Color); 2], four_cats.clone(), four_cats, vec![rand::random::(Cat, Color)]].into_iter().flatten().collect::<Vec<_>>();<br>

Ahhh, this one was tricky 😅

Source: mastodon.nl/@ErikSchouten73/10…

@ErikSchouten73

#cat #CatsOfMastodon #rust #RustLanguage #RustLang #RustCataStructures