Commit 57112d49 authored by Romain Vimont's avatar Romain Vimont Committed by Thomas Daede
Browse files

Use anonymous lifetimes in PlaneRegion

The lifetime in Index and IndexMut trait implementation can be

All tiling structures implementing Index and IndexMut use an anonymous
lifetime, except plane regions. Fix this inconsistency.
parent 60723774
......@@ -270,7 +270,7 @@ macro_rules! plane_region_common {
unsafe impl<T: Pixel> Send for $name<'_, T> {}
unsafe impl<T: Pixel> Sync for $name<'_, T> {}
impl<'a, T: Pixel> Index<usize> for $name<'a, T> {
impl<T: Pixel> Index<usize> for $name<'_, T> {
type Output = [T];
......@@ -368,7 +368,7 @@ impl<'a, T: Pixel> PlaneRegionMut<'a, T> {
impl<'a, T: Pixel> IndexMut<usize> for PlaneRegionMut<'a, T> {
impl<T: Pixel> IndexMut<usize> for PlaneRegionMut<'_, T> {
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
assert!(index < self.rect.height);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment