Simplify projection methods by joshlf · Pull Request #2895 · google/zerocopy
This was referenced
Jan 16, 2026Base automatically changed from G2eb58496ed1e3c61421020abbbb694d970d43c1c to main
January 16, 2026 23:20Remove high-level `HasField::project_inner`, and rename `HasField::project_raw` to `HasField::project`. The new plan is for `pointer::cast::Project` and `HasField` to only have `project` methods which project from `PtrInner<Src>` to `*mut Dst`, and for callers who want `PtrInner -> PtrInner` or `Ptr -> Ptr` to use inherent methods on `PtrInner` and `Ptr`. Compared to a default-impl'd method on `HasField`, this reduces indirection and reduces pressure on the optimizer. Reverts #2884, #2885 gherrit-pr-id: G481927cb6e9ca76c1531c05465f608e1b2607a62
joshlf
deleted the
G481927cb6e9ca76c1531c05465f608e1b2607a62
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters