Skip to main content

Clone

Ownership in Rust 3. Clone guilt and the Republic of types

·9 mins
The Rust community turned .clone() into a moral failing. That dogma is as dangerous as the Jedi Council’s inability to adapt. We put the guilt under a microscope: the real performance numbers, the clippy lint that reinforces it, and the type theory that explains why Rust makes duplication visible in the first place.

Ownership in Rust 2. Six ways to share state and how to pick the right one

·9 mins
Move, borrow, clone, Rc, Arc, Cow. Rust gives you six lightsaber forms for ownership. Each one counters a specific threat. Using the wrong form against the wrong opponent is not just inelegant, it is fatal. We map each strategy to the situations where it excels and where it fails catastrophically.

Ownership in Rust 1. Stop fearing .clone()

·7 mins
The Rust community treats .clone() like a code smell. Sometimes it is. But most of the time, the instinct to avoid it costs more in complexity than the clone costs in nanoseconds. We dissect what clone actually does for every common type, the real cost spectrum across six orders of magnitude, and why Clone and Copy are not the same conversation.

Todo TUI in Rust 1. Scaffolding the TUI adapter and designing the state machine

·8 mins
We start a new series by migrating the CLI adapter to a ratatui TUI. We set up the new dependencies, design the module structure under adapters/tui/, model the interaction modes as an enum to make invalid states unrepresentable, and solve the ownership puzzle of cloning a repository in a persistent session.