File tree Expand file tree Collapse file tree 5 files changed +7
-3
lines changed Expand file tree Collapse file tree 5 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -103,10 +103,10 @@ impl Embed {
103103 } ;
104104
105105 unsafe {
106- zend_stream_init_filename ( & mut file_handle, path. as_ptr ( ) ) ;
106+ zend_stream_init_filename ( & raw mut file_handle, path. as_ptr ( ) ) ;
107107 }
108108
109- let exec_result = try_catch ( || unsafe { php_execute_script ( & mut file_handle) } ) ;
109+ let exec_result = try_catch ( || unsafe { php_execute_script ( & raw mut file_handle) } ) ;
110110
111111 match exec_result {
112112 Err ( _) => Err ( EmbedError :: CatchError ) ,
@@ -208,7 +208,7 @@ impl Embed {
208208 let exec_result = try_catch ( || unsafe {
209209 zend_eval_string (
210210 cstr. as_ptr ( ) . cast :: < c_char > ( ) ,
211- & mut result,
211+ & raw mut result,
212212 c"run" . as_ptr ( ) . cast ( ) ,
213213 )
214214 } ) ;
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ impl<T: RegisteredClass> ZendClassObject<T> {
173173 Self :: internal_from_zend_obj ( std)
174174 }
175175
176+ #[ allow( clippy:: mut_from_ref) ]
176177 fn internal_from_zend_obj ( std : & zend_object ) -> Option < & mut Self > {
177178 let std = ptr:: from_ref ( std) . cast :: < c_char > ( ) ;
178179 let ptr = unsafe {
Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ impl Zval {
262262 /// Returns a mutable reference to the zval if it is an internal indirect
263263 /// reference.
264264 #[ must_use]
265+ #[ allow( clippy:: mut_from_ref) ]
265266 pub fn indirect_mut ( & self ) -> Option < & mut Zval > {
266267 if self . is_indirect ( ) {
267268 Some ( unsafe { & mut * ( self . value . zv . cast :: < Zval > ( ) ) } )
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ impl ClassEntry {
114114 ///
115115 /// Returns [`None`] if there is no associated iterator for the class.
116116 #[ must_use]
117+ #[ allow( clippy:: mut_from_ref) ]
117118 pub fn get_iterator < ' a > ( & self , zval : & ' a Zval , by_ref : bool ) -> Option < & ' a mut ZendIterator > {
118119 let ptr: * const Self = self ;
119120 let zval_ptr: * const Zval = zval;
Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ impl ExecutorGlobals {
106106
107107 /// Attempts to retrieve the global functions hash table as mutable.
108108 #[ must_use]
109+ #[ allow( clippy:: mut_from_ref) ]
109110 pub fn function_table_mut ( & self ) -> Option < & mut ZendHashTable > {
110111 unsafe { self . function_table . as_mut ( ) }
111112 }
You can’t perform that action at this time.
0 commit comments