dom: Remove unnecessary generic from private_from_proto_check_static.

This commit is contained in:
Josh Matthews 2020-06-02 15:17:32 -04:00
parent 70c43b7a5c
commit 96698779cc

View file

@ -452,13 +452,10 @@ where
/// Returns Err(()) if `obj` is a wrapper or if the object is not an object
/// for a DOM object of the given type (as defined by the proto_id and proto_depth).
#[inline]
pub unsafe fn private_from_proto_check_static<F>(
unsafe fn private_from_proto_check_static(
obj: *mut JSObject,
proto_check: F,
) -> Result<*const libc::c_void, ()>
where
F: Fn(&'static DOMClass) -> bool,
{
proto_check: fn(&'static DOMClass) -> bool,
) -> Result<*const libc::c_void, ()> {
let dom_class = get_dom_class(obj).map_err(|_| ())?;
if proto_check(dom_class) {
trace!("good prototype");