From a20db08f06f93a693b9288728fc2a4a522f42344 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Fri, 20 May 2016 22:34:42 +0200 Subject: =?UTF-8?q?Remove=20Prefable::terminator=20=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/script/dom/bindings/utils.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'components/script/dom/bindings/utils.rs') diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index 607f74456d2..3ba5838a4fa 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -557,24 +557,17 @@ pub struct Prefable { pub pref: Option<&'static str>, /// The underlying slice of specifications. pub specs: &'static [T], - /// Whether the specifications contain special terminating entries that should be - /// included or not. - pub terminator: bool, } impl Prefable { /// Retrieve the slice represented by this container, unless the condition /// guarding it is false. - pub fn specs(&self) -> &'static [T] { + pub fn specs(&self) -> Option<&'static [T]> { if let Some(pref) = self.pref { if !prefs::get_pref(pref).as_boolean().unwrap_or(false) { - return if self.terminator { - &self.specs[self.specs.len() - 1..] - } else { - &[] - }; + return None; } } - self.specs + Some(self.specs) } } -- cgit v1.2.3