Advent of Code 2019 Day 6 - Beginner Rust solution
Disclaimer: I don't know Rust.

I only have comments on performance.

To compute the number of orbits, it's unnecessary to compute paths, you could compute just the length of paths. That would reduce the space complexity to constant.

When computing the number of orbits, instead of going from each planet until the root, you could go from the root, traversing paths to every planet exactly once. That would reduce the time complexity to linear.

When computing the common ancestor from SAN and YOU, you only need to track part of the path segments, until a common point.