File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use std::ffi::CString;
6
6
use std:: iter:: repeat;
7
7
use std:: marker:: PhantomData ;
8
8
use std:: mem;
9
+ use std:: ops:: Deref ;
9
10
use std:: ptr;
10
11
use std:: string:: String ;
11
12
use std:: vec:: Vec ;
@@ -826,13 +827,13 @@ impl<'r> EventList for &'r [Event] {
826
827
}
827
828
}
828
829
829
- impl < ' r , ' s > EventList for & ' r [ Option < & ' s Event > ] {
830
+ impl < ' r , ' s , D : Deref < Target = & ' s Event > > EventList for & ' r [ Option < D > ] {
830
831
fn as_event_list < T , F > ( & self , f : F ) -> T
831
832
where F : FnOnce ( * const cl_event , cl_uint ) -> T
832
833
{
833
834
let mut vec: Vec < cl_event > = Vec :: with_capacity ( self . len ( ) ) ;
834
- for item in self . iter ( ) {
835
- if let Some ( item) = * item {
835
+ for item in self . iter ( ) {
836
+ if let Some ( ref item) = * item {
836
837
vec. push ( item. event ) ;
837
838
}
838
839
}
You can’t perform that action at this time.
0 commit comments