-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clippy: Remove .clone() where possible. #665
Clippy: Remove .clone() where possible. #665
Conversation
Improved readability. Co-authored-by: Laurențiu Nicola <[email protected]>
simpler to use self.polygon() Co-authored-by: Laurențiu Nicola <[email protected]>
Thanks! bors r+ |
665: Clippy: Remove .clone() where possible. r=lnicola a=martinfrances107 - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). --- Looking at the output of `cargo clippy` I want to cherry pick the single aspect I find most troublesome. In general it is better to use copy over clone. It has been fixed in a couple of places. Co-authored-by: Martin <[email protected]> Co-authored-by: martin frances <[email protected]>
Build failed: |
CI errors looks like a precision issue or an over-zealous check. |
looking at the test ouput - it is a precision issue ---- algorithm::map_coords::test::test_fallible_proj stdout ---- so the last assert_eq!() in test_failing_proj
Comparing floating point numbers needs care and attention, here is the issue which solved the issue brittle The solution is to use assert_relative_eq!() where possible .. this work has already been done .. we just need to uniformly apply the policy just as an example multipolygon_two_polygons_test() does the correct thing.
I am going to create an issue to solve this today.. I will post an update here with a link. |
Yeah, |
Ok here is the new issue... I will create a patch later today |
bors retry |
Build succeeded: |
Looking at the output of
cargo clippy
I want to cherry pick the single aspect I find most troublesome.
In general it is better to use copy over clone.
It has been fixed in a couple of places.