redundant-clone Disallow clones proven unnecessary by ownership and liveness Cloning an owned value at its final use duplicates the value before the original is discarded. Instead, you SHOULD move the original value when it is not used afterward. - Category: performance - Level: warning - Fix: none - Scope: module Reported import { rc } from "destack:memory"; function retain(value: rc.Rc): rc.Rc { return value.clone(); } Accepted import { rc } from "destack:memory"; function retain(value: rc.Rc): rc.Rc { return value; } Prior art - Clippy ยท redundantclone language/linter/src/rules/performance/redundantclone.rs:7