mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
dom: Remove unnecessary generic from private_from_proto_check_static.
This commit is contained in:
parent
70c43b7a5c
commit
96698779cc
1 changed files with 3 additions and 6 deletions
|
@ -452,13 +452,10 @@ where
|
||||||
/// Returns Err(()) if `obj` is a wrapper or if the object is not an object
|
/// 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).
|
/// for a DOM object of the given type (as defined by the proto_id and proto_depth).
|
||||||
#[inline]
|
#[inline]
|
||||||
pub unsafe fn private_from_proto_check_static<F>(
|
unsafe fn private_from_proto_check_static(
|
||||||
obj: *mut JSObject,
|
obj: *mut JSObject,
|
||||||
proto_check: F,
|
proto_check: fn(&'static DOMClass) -> bool,
|
||||||
) -> Result<*const libc::c_void, ()>
|
) -> Result<*const libc::c_void, ()> {
|
||||||
where
|
|
||||||
F: Fn(&'static DOMClass) -> bool,
|
|
||||||
{
|
|
||||||
let dom_class = get_dom_class(obj).map_err(|_| ())?;
|
let dom_class = get_dom_class(obj).map_err(|_| ())?;
|
||||||
if proto_check(dom_class) {
|
if proto_check(dom_class) {
|
||||||
trace!("good prototype");
|
trace!("good prototype");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue