From e25feccc11b733d2401aff236c2a9867bb1edc94 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 29 Aug 2018 18:50:17 -0700 Subject: [PATCH] webidl: Remove support for Uint8ClampedArray Our bindings currently translate this to `&[u8]` which is actually `Uint8Array`. We'll need to fix #421 before supporting this. --- crates/webidl-tests/array.rs | 1 - crates/webidl/src/idl_type.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/webidl-tests/array.rs b/crates/webidl-tests/array.rs index 7de3ea1b..f44622f0 100644 --- a/crates/webidl-tests/array.rs +++ b/crates/webidl-tests/array.rs @@ -14,7 +14,6 @@ fn take_and_return_a_bunch_of_slices() { assert_eq!(f.i16(&[1, 2]), [3, 4, 5]); assert_eq!(f.i32(&[1, 2]), [3, 4, 5]); assert_eq!(f.u8(&[1, 2]), [3, 4, 5]); - assert_eq!(f.u8_clamped(&[1, 2]), [3, 4, 5]); assert_eq!(f.u16(&[1, 2]), [3, 4, 5]); assert_eq!(f.u32(&[1, 2]), [3, 4, 5]); } diff --git a/crates/webidl/src/idl_type.rs b/crates/webidl/src/idl_type.rs index c5504fdf..1f88d008 100644 --- a/crates/webidl/src/idl_type.rs +++ b/crates/webidl/src/idl_type.rs @@ -459,7 +459,7 @@ impl<'a> IdlType<'a> { IdlType::DataView => None, IdlType::Int8Array => Some(array("i8", pos)), IdlType::Uint8Array => Some(array("u8", pos)), - IdlType::Uint8ClampedArray => Some(array("u8", pos)), + IdlType::Uint8ClampedArray => None, // FIXME(#421) IdlType::Int16Array => Some(array("i16", pos)), IdlType::Uint16Array => Some(array("u16", pos)), IdlType::Int32Array => Some(array("i32", pos)),