mitsuhiko / minijinja

MiniJinja is a powerful but minimal dependency template engine for Rust compatible with Jinja/Jinja2
https://docs.rs/minijinja/
Apache License 2.0
1.56k stars 86 forks source link

Improve downcast_object_ref docs #512

Closed jplatte closed 4 months ago

jplatte commented 4 months ago

Looks like there's a new clippy lint out there! Many errors like this:

error: bound is defined in more than one place
   --> minijinja/src/value/serialize.rs:126:23
    |
126 |     fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Value, InvalidValue>
    |                       ^
127 |     where
128 |         T: Serialize,
    |         ^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
    = note: `-D clippy::multiple-bound-locations` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::multiple_bound_locations)]`

Happy to provide another PR, do you want to silence the lint, move the ?Sized bounds to where clauses, or move the other bounds outside of where?

mitsuhiko commented 4 months ago

Fixed the warnings on main.