Commit graph

26 commits

Author SHA1 Message Date
Vincent Prouillet 0d5fefd446 Update image to 0.23 2020-02-10 20:48:52 +01:00
Sam Ford e804f907b2 Use Rust 2018 edition (#885) 2020-02-02 17:48:43 -08:00
Tjeu Kayim 6149fd17e1 Skip anchor checking for URL with prefix in config (#812)
* cargo fmt & clippy

* Skip anchor checking for URL with prefix in config
2020-02-02 17:45:16 -08:00
Arne Beer f96aad2fdd Only shrink when resizing with fit (#803) 2019-09-24 16:54:14 -07:00
Vincent Prouillet b396a1bc20 Add --drafts flag + rustfmt 2019-08-24 22:23:08 +02:00
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
Jakub Wieczorek b716401217 Fix warnings caused by unnecessary mut qualifiers (#735) 2019-07-12 22:54:18 +02:00
Vincent Prouillet cb962f7a64 Add aliases to sections 2019-06-02 20:21:06 +02:00
Vincent Prouillet 9bc675f2a7 Fix colocated dates + rustfmt
Closes #607
2019-02-09 19:54:47 +01:00
Vincent Prouillet 5caf24f06c Remove error-chain
Closes #576
2019-01-17 14:31:47 +01:00
Vincent Prouillet 832360f9b1 Update deps + rustfmt 2019-01-02 20:41:29 +01:00
Vojtech Kral 9bd6a559c1 imageproc: Use Lanczos3 filter instead of Gaussian 2018-12-28 01:41:22 +01:00
Vojtech Kral 6e84eec32b imageproc: Add the format option, support for PNG thumbnails
Fix #546
2018-12-28 01:41:22 +01:00
Vincent Prouillet b7ce4e59fb rustfmt 2018-10-31 08:18:57 +01:00
Vincent Prouillet f5c88540ed Update reqwest and image 2018-09-30 19:17:51 +02:00
Vincent Prouillet 62b89d0c72 _processed_images -> processed_images 2018-09-15 13:16:46 +02:00
Thomas Hurst 088b3df79a Replace fold/reduce over Result::and with collect
Not only is this tidier, but it avoids making these iterators
Rayon-specific.
2018-09-13 19:17:05 +01:00
Vincent Prouillet 60a52fd2cc Some intellij reformatting 2018-07-31 15:30:49 +02:00
Vincent Prouillet 1ae0702494
Custom taxonomies (#330) 2018-07-16 10:54:05 +02:00
Vincent Prouillet d47ba4aff0 Rebasing + tweaks 2018-06-25 19:13:21 +02:00
Vojtech Kral 17de3c9a97 imageproc: Rename _resized_images as _processed_images 2018-06-25 18:09:45 +02:00
Vojtech Kral 3e4aa82ecc imageproc: Use DefaultHasher from stdlib instead of twox-hash 2018-06-25 18:09:45 +02:00
Vojtech Kral a89768dab0 Remove page.images 2018-06-25 18:09:03 +02:00
Vojtech Kral 4a6244adcf imageproc: Cleanup and comments in hash collision resolution 2018-06-25 18:05:49 +02:00
Vojtech Kral 77bc526008 imageproc: Fix naming, cleanup 2018-06-25 18:05:49 +02:00
Vojtech Kral 6662014e55 Add image resizing support #225 2018-06-25 18:05:04 +02:00