pub fn intersection(&self, other: &Self) -> Self {
        assert!(
            ::std::ptr::eq(self.graph.0, other.graph.0),
            "package graphs passed into intersection() match"
        );
        let mut res = self.clone();
        res.core.intersect_with(&other.core);
        res
    }
Returns a `PackageSet` that contains all packages present in both `self` and `other`.

## Panics

Panics if the package graphs associated with `self` and `other` don't match.
guppy/src/graph/resolve.rs