diff --git a/components/style/gecko_bindings/sugar/ns_style_auto_array.rs b/components/style/gecko_bindings/sugar/ns_style_auto_array.rs index be1a20c570f..512b2138df0 100644 --- a/components/style/gecko_bindings/sugar/ns_style_auto_array.rs +++ b/components/style/gecko_bindings/sugar/ns_style_auto_array.rs @@ -15,9 +15,6 @@ use std::slice::{Iter, IterMut}; impl Index for nsStyleAutoArray { type Output = T; fn index(&self, index: usize) -> &T { - if index > self.len() { - panic!("out of range") - } match index { 0 => &self.mFirstElement, _ => &self.mOtherElements[index - 1], @@ -27,9 +24,6 @@ impl Index for nsStyleAutoArray { impl IndexMut for nsStyleAutoArray { fn index_mut(&mut self, index: usize) -> &mut T { - if index > self.len() { - panic!("out of range") - } match index { 0 => &mut self.mFirstElement, _ => &mut self.mOtherElements[index - 1],