Fix bugs in code folding
This commit is contained in:
parent
e3061066c9
commit
637e8ada42
7 changed files with 82 additions and 27 deletions
|
@ -145,6 +145,23 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub trait MapRangeEndsExt<R> {
|
||||
fn map_endpoints<T, F>(self, f: F) -> Range<T>
|
||||
where
|
||||
Self: Sized,
|
||||
F: Fn(R) -> T;
|
||||
}
|
||||
|
||||
impl<R> MapRangeEndsExt<R> for Range<R> {
|
||||
fn map_endpoints<T, F>(self, f: F) -> Range<T>
|
||||
where
|
||||
Self: Sized,
|
||||
F: Fn(R) -> T,
|
||||
{
|
||||
f(self.start)..f(self.end)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct LogErrorFuture<F>(F, log::Level);
|
||||
|
||||
impl<F, T> Future for LogErrorFuture<F>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue