Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formatter::with_options: Use different lifetimes
Formatter::with_options takes self as a mutable reference (`&'a mut Formatter<'b>`). `'a` and `'b` need to be different lifetimes. Just taking `&'a mut Formatter<'a>` and trusting in Rust being able to implicitely convert from `&'a mut Formatter<'b>` if necessary (after all, `'a` must be smaller than `'b` anyway) fails because `'b` is behind a *mutable* reference. For background on on this behavior, see https://doc.rust-lang.org/nomicon/subtyping.html#variance.
- Loading branch information