mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
||||
/// 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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue