The trait object version will require the caller to take (or have) a reference, which prevents them from passing you an owned object if they don’t care about it anymore. The generics version would allow that, so there’s an ergonomics and usability improvement there.
However, you’ll be looking at potentially longer compile times and code bloat if you use lots of different combinations of the parameters. It’s unlikely that getting the &Path is actually critical for performance so any inlining that occurs won’t buy you much.
If you’re considering the trait object reference approach, you may as well consider just taking two &Path references directly as well. It makes for slightly less ergonomics on the caller and they can’t hand you an owned object either. But, that’s not really that terrible here.
If you really want max flexibility for the caller, the generic version is best.