How to avoid lifetimes annotations in Rust 🦀

Lifetime annotations are one of the things that distract the most new rustaceans. Here is my strategy to avoid them and write clean code

@sylvain There are good reasons for lifetimes surfacing in APIs, eg. when safety guarantees require that objects have unique types. Then, it is important to document these (`'a` won't cut it). Example I recently updated: (although it also falls in your "embedded" category, on a platform where no library should alloc).

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!