port all optional features to 2018-edition

This commit is contained in:
Daniel Eades
2019-08-08 18:47:12 +01:00
committed by Sean McArthur
parent 4773408ae4
commit 3ba4b6eadf
20 changed files with 103 additions and 104 deletions

View File

@@ -261,12 +261,12 @@ and the compiler could not infer the lifetimes of those references. That means
people would need to annotate the closure's argument types, which is garbase.
pub trait Redirect {
fn redirect(&self, next: &Url, previous: &[Url]) -> ::Result<bool>;
fn redirect(&self, next: &Url, previous: &[Url]) -> Result<bool>;
}
impl<F> Redirect for F
where F: Fn(&Url, &[Url]) -> ::Result<bool> {
fn redirect(&self, next: &Url, previous: &[Url]) -> ::Result<bool> {
where F: Fn(&Url, &[Url]) -> Result<bool> {
fn redirect(&self, next: &Url, previous: &[Url]) -> Result<bool> {
self(next, previous)
}
}