Marlyn(Moved to glitch.social) utilise witches.town. Vous pouvez læ suivre et interagir si vous possédez un compte quelque part dans le "fediverse".

Hey is there a good way to mock objects in Rust? How should I unit test stuff that’s tightly coupled to hardware APIs?

@ticky I've seen a lot of people do that with generics, but obviously that doesn't work in every situation. I dunno.

@Gyro I think testing via a test implementation of a trait is the right way, but I don't know how to do that for a function someone else has already implemented

long-winded attempt at "helping" 1/ Afficher plus

Marlyn(Moved to glitch.social) @marlyn

long-winded attempt at "helping" 2/2 Afficher plus

long-winded attempt at "helping" Afficher plus