@@ -64,7 +64,7 @@ fn hyper_service_fn(
64
64
// because the response body might borrow from the request. Instead,
65
65
// we do the body writing in another future that will send us
66
66
// the response metadata (and a body channel) beforehand.
67
- let ( tx, rx) = futures :: channel :: oneshot:: channel ( ) ;
67
+ let ( tx, rx) = oneshot:: channel ( ) ;
68
68
69
69
spawn. spawn ( async move {
70
70
// Get all of the information from Hyper.
@@ -105,7 +105,7 @@ impl Rocket {
105
105
fn issue_response < ' r > (
106
106
& self ,
107
107
response : Response < ' r > ,
108
- tx : futures :: channel :: oneshot:: Sender < hyper:: Response < hyper:: Body > > ,
108
+ tx : oneshot:: Sender < hyper:: Response < hyper:: Body > > ,
109
109
) -> impl Future < Output = ( ) > + ' r {
110
110
let result = self . write_response ( response, tx) ;
111
111
async move {
@@ -124,7 +124,7 @@ impl Rocket {
124
124
fn write_response < ' r > (
125
125
& self ,
126
126
mut response : Response < ' r > ,
127
- tx : futures :: channel :: oneshot:: Sender < hyper:: Response < hyper:: Body > > ,
127
+ tx : oneshot:: Sender < hyper:: Response < hyper:: Body > > ,
128
128
) -> impl Future < Output = io:: Result < ( ) > > + ' r {
129
129
async move {
130
130
let mut hyp_res = hyper:: Response :: builder ( ) ;
@@ -785,6 +785,8 @@ impl Rocket {
785
785
// We need to get these values before moving `self` into an `Arc`.
786
786
let mut shutdown_receiver = self . shutdown_receiver
787
787
. take ( ) . expect ( "shutdown receiver has already been used" ) ;
788
+
789
+ #[ cfg( feature = "ctrl_c_shutdown" ) ]
788
790
let shutdown_handle = self . get_shutdown_handle ( ) ;
789
791
790
792
let rocket = Arc :: new ( self ) ;
0 commit comments