Closed tpikonen closed 7 months ago
Maybe we should thread only the version, instead of the whole &Gpx
?
I'm pretty new to Rust, but I would be surprised if function arguments are copied into the stack, especially when the value is a reference.
So, this should not be a performance issue, but maybe there are other reasons to not pass the whole type?
No, I'm not worried about performance. Passing the version might be a couple % faster if you ignore the I/O, but that's not the issue.
I'm thinking that we should only pass the necessary information instead of the whole thing, so the code doesn't end up looking where it shouldn't.
Here's a version which passes only gpx.version
.
r? @frewsxcv
[x] I added an entry to
CHANGELOG.md
if knowledge of this change could be valuable to users.Does what it says in the tin.