Closed tirix closed 2 years ago
@david-a-wheeler my initial changes to the Travis CI were probably buggy, so Travis was not run. I changed to a simpler version, which runs clippy on the whole matrix: I don't think this is necessary, I suppose we could have a single clippy step?
util.rs:45 allow(clippy::ptr_eq) I'm unsure about this one, but I assume this is different from the default ptr_eq, so we want to keep it.
It's not. The default ptr_eq exists on pointers, but they will be coerced if you use it on references:
fn ptr_eq<T>(x: &T, y: &T) -> bool {
std::ptr::eq(x, y)
}
This differs from x == y
, which will call the PartialEq
implementation for T
.
Many thanks Mario! I've applied all your propositions.
This is the result of a clippy pass over the whole project. I've generally accepted clippy's suggestions, except in the following cases where I've added
allow
's to silence it:grammar.rs:779: allow(clippy::too_many_arguments) Fixing this means a bigger rearchitecture.This is not relevant since #21 , since the function is iterative.proof.rs:793 : allow(clippy::map_entry) We cannot follow on clippy's suggestion, otherwise we would need to borrow "self" twicesegment_set.rs:437 allow(clippy::branches_sharing_code) FixedI'm unsure about this one, but I assume this is different from the default ptr_eq, sowe want to keep it.util.rs:83 allow(clippy::no_effect) Code actually has effect, since it enforces bounds checkI've also changed the Travis CI to include clippy. @david-a-wheeler could you please check especially if I've done that correctly?