From f072c0bb05ddb9312223a069df9da67bfd887b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 4 Oct 2017 14:44:57 +0200 Subject: [PATCH] style: Use the hashmap indexed getter in the custom props iterator code. This will give a nicer error message, plus it's more compact. --- components/style/custom_properties.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs index 3d97eb2d08d..3590b10d133 100644 --- a/components/style/custom_properties.rs +++ b/components/style/custom_properties.rs @@ -197,7 +197,7 @@ where let ref key = index[index.len() - self.pos - 1]; self.pos += 1; - let value = self.inner.values.get(key).unwrap(); + let value = &self.inner.values[key]; Some((key, value)) } }