11// Copyright 2023-2024 Daniil Gentili
2- //
2+ //
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
55// You may obtain a copy of the License at
6- //
6+ //
77// http://www.apache.org/licenses/LICENSE-2.0
8- //
8+ //
99// Unless required by applicable law or agreed to in writing, software
1010// distributed under the License is distributed on an "AS IS" BASIS,
1111// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
1515use crate :: borrow_unchecked:: borrow_unchecked;
16- use ext_php_rs:: { boxed:: ZBox , call_user_func, prelude:: * , types:: ZendHashTable , zend:: Function } ;
16+ use ext_php_rs:: types:: Zval ;
17+ use ext_php_rs:: { call_user_func, prelude:: * , zend:: Function } ;
1718use lazy_static:: lazy_static;
1819use std:: {
1920 cell:: RefCell ,
@@ -23,7 +24,6 @@ use std::{
2324 os:: fd:: { AsRawFd , FromRawFd , RawFd } ,
2425 sync:: mpsc:: { channel, Receiver , Sender } ,
2526} ;
26- use ext_php_rs:: types:: Zval ;
2727use tokio:: runtime:: Runtime ;
2828
2929lazy_static ! {
@@ -46,8 +46,8 @@ fn sys_pipe() -> io::Result<(RawFd, RawFd)> {
4646
4747#[ cfg( any( target_os = "macos" ) ) ]
4848fn set_cloexec ( fd : RawFd ) -> io:: Result < ( ) > {
49- use libc:: { F_SETFD , FD_CLOEXEC , F_GETFD } ;
5049 use libc:: fcntl;
50+ use libc:: { FD_CLOEXEC , F_GETFD , F_SETFD } ;
5151
5252 let flags = unsafe { fcntl ( fd, F_GETFD , 0 ) } ;
5353 if flags == -1 {
@@ -177,7 +177,8 @@ impl EventLoop {
177177 while let Ok ( 1 ) = c. notify_receiver . read ( & mut c. dummy ) { }
178178
179179 for mut suspesion in c. receiver . try_iter ( ) {
180- suspesion. 0
180+ suspesion
181+ . 0
181182 . object_mut ( )
182183 . unwrap ( )
183184 . try_call_method ( "resume" , vec ! [ ] ) ?;
0 commit comments