File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ impl GearmanServer {
52
52
let senders_by_conn_id = Arc :: new ( Mutex :: new ( HashMap :: new ( ) ) ) ;
53
53
let workers_by_conn_id = Arc :: new ( Mutex :: new ( BTreeMap :: new ( ) ) ) ;
54
54
let job_waiters = Arc :: new ( Mutex :: new ( HashMap :: new ( ) ) ) ;
55
- let rt = runtime:: Runtime :: new ( ) . unwrap ( ) ;
55
+ let rt = runtime:: Runtime :: new ( ) . expect ( "Runtime without config should work." ) ;
56
56
let acceptor: Acceptor = match tls {
57
57
None => None ,
58
58
#[ cfg( feature = "tls" ) ]
@@ -78,7 +78,10 @@ impl GearmanServer {
78
78
continue ;
79
79
}
80
80
} ;
81
- let conn_id: usize = plain_sock. as_raw_fd ( ) . try_into ( ) . unwrap ( ) ;
81
+ let conn_id: usize = plain_sock
82
+ . as_raw_fd ( )
83
+ . try_into ( )
84
+ . expect ( "Any OS we work on will have usize-ish FDs" ) ;
82
85
let sock = match acceptor {
83
86
None => WrappedStream :: from ( plain_sock) ,
84
87
#[ cfg( feature = "tls" ) ]
You can’t perform that action at this time.
0 commit comments