zola/components
traviscross 46ee256ba4 Fix clippy warnings (#744)
Clippy is returning some warnings.  Let's fix or explicitly ignore
them.  In particular:

- In `components/imageproc/src/lib.rs`, we implement `Hash` explicitly
  but derive `PartialEq`.  We need to maintain the property that two
  keys being equal implies the hashes of those two keys are equal.
  Our `Hash` implementations preserve this, so we'll explicitly ignore
  the warnings.

- In `components/site/src/lib.rs`, we were calling `.into()` on some
  values that are already of the correct type.

- In `components/site/src/lib.rs`, we were using `.map(|x| *x)` in
  iterator chains to remove a level of indirection; we can instead say
  `.copied()` (introduced in Rust v1.36) or `.cloned()`.  Using
  `.copied` here is better from a type-checking point of view, but
  we'll use `.cloned` for now as Rust v1.36 was only recently
  released.

- In `components/templates/src/filters.rs` and
  `components/utils/src/site.rs`, we were taking `HashMap`s as
  function arguments but not generically accepting alternate `Hasher`
  implementations.

- In `src/cmd/check.rs`, we use `env::current_dir()` as a default
  value, but our use of `unwrap_or` meant that we would always
  retrieve the current directory even when not needed.

- In `components/errors/src/lib.rs`, we can use `if let` rather than
  `match`.

- In `components/library/src/content/page.rs`, we can collapse a
  nested conditional into `else if let ...`.

- In `components/library/src/sorting.rs`, a function takes `&&Page`
  arguments.  Clippy warns about this for efficiency reasons, but
  we're doing it here to match a particular sorting API, so we'll
  explicitly ignore the warning.
2019-07-12 22:54:18 +02:00
..
config Add an option to hard link files from static/ instead of copying. (#723) 2019-07-12 22:54:18 +02:00
errors Fix clippy warnings (#744) 2019-07-12 22:54:18 +02:00
front_matter Update deps 2019-06-21 09:24:14 +02:00
imageproc Fix clippy warnings (#744) 2019-07-12 22:54:18 +02:00
library Fix clippy warnings (#744) 2019-07-12 22:54:18 +02:00
link_checker rustfmt 2018-10-31 08:18:57 +01:00
rebuild Split sitemap (#619) 2019-03-14 20:57:22 +01:00
rendering Update deps 2019-06-21 09:24:14 +02:00
search Update deps + rustfmt 2019-01-02 20:41:29 +01:00
site Fix clippy warnings (#744) 2019-07-12 22:54:18 +02:00
templates Fix clippy warnings (#744) 2019-07-12 22:54:18 +02:00
utils Fix clippy warnings (#744) 2019-07-12 22:54:18 +02:00