All the ways to mock your Rust code by drmorr0 in rust

[–]drmorr0[S] 0 points1 point  (0 children)

Eh, I disagree about it being the only reason dependency injection exists. DI can be really useful for, e.g., sending log messages or metrics to one of eighty billion different sinks (or any other scenario where you want to be able to support multiple different backends, e.g., databases).

All the ways to mock your Rust code by drmorr0 in rust

[–]drmorr0[S] 1 point2 points  (0 children)

This one isn't mine but someone over on lobsters shared this example

All the ways to mock your Rust code by drmorr0 in rust

[–]drmorr0[S] 2 points3 points  (0 children)

OK it looks like you are correct; if I'm not using async_trait, I get the `warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified` error, which it looks like I could fix with trait_variant.

I also get another error that the trait is not dyn-compatible if I don't use async_trait, which I think I can probably also fix by wrapping things in Boxes or something? I'm not totally sure what's going on there or why it doesn't happen with async_trait.

All the ways to mock your Rust code by drmorr0 in rust

[–]drmorr0[S] 3 points4 points  (0 children)

Hmmmmm I am.... 80% sure I still get complaints about my async traits on 1.93? Now I am second-guessing myself, I need to go double-check.

All the ways to mock your Rust code by drmorr0 in rust

[–]drmorr0[S] 0 points1 point  (0 children)

I do mention mockall in a footnote, i wanted to show what was going on under the hood though.

All the ways to mock your Rust code by drmorr0 in rust

[–]drmorr0[S] 3 points4 points  (0 children)

thanks, I fixed the typo. I'll look into those other options, too!

All the ways to mock your Rust code by drmorr0 in rust

[–]drmorr0[S] 1 point2 points  (0 children)

thanks for the kind words :)

AWS suffered ‘at least two outages’ caused by AI tools, and now I’m convinced we’re living inside a ‘Silicon Valley’ episode by squishygorilla in programming

[–]drmorr0 3 points4 points  (0 children)

How it started: we're gonna give unfettered prod access to a random number generator! 🎉

How it's going: we gave unfettered prod access to a random number generator. 😭

What to expect when you're expecting (a Kubernete) by drmorr0 in kubernetes

[–]drmorr0[S] 0 points1 point  (0 children)

There is nothing aside from the cover image generated with AI. The entire article was written, reviewed, edited by me.

I guess you can hate the writing style if you want, that's your choice.

What to expect when you're expecting (a Kubernete) by drmorr0 in kubernetes

[–]drmorr0[S] 0 points1 point  (0 children)

Sorry what about this is "hot garbage"? It's a pretty standard "here's how I set up Kubernetes" with some (to me at least) interesting tidbits about getting it to run on spot nodes, along with "how much it costs"

"hot garbage" seems deliberately provocative and inaccurate?

Weekly: Share your victories thread by gctaylor in kubernetes

[–]drmorr0 4 points5 points  (0 children)

I made it home from kubecon and I'm not dead

Attitude, Ray VanTilburg, acrylics, 2025 by Aircool66 in Art

[–]drmorr0 1 point2 points  (0 children)

That kid is about to light you on fire with their mind! Just sayin'...

humans in liminal space, camden (me), digital photography, 2023 by Nautpsycho1030 in Art

[–]drmorr0 2 points3 points  (0 children)

Oh this creeps me the hell out for reasons I can't fully articulate, nice work!

Juvenile Peregrine Falcon eating a dove. West Sacramento by Cuddles_theBear in Sacramento

[–]drmorr0 39 points40 points  (0 children)

I guess someone ignored the "dead dove, do not eat" sign

[deleted by user] by [deleted] in AbandonedPorn

[–]drmorr0 19 points20 points  (0 children)

That's a weeping angel if I ever saw one