Skip to content

Commit f2ce55f

Browse files
jebrosenSergioBenitez
authored andcommitted
Fix a few unused import warnings.
1 parent 6edeebf commit f2ce55f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

core/lib/src/rocket.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn hyper_service_fn(
6464
// because the response body might borrow from the request. Instead,
6565
// we do the body writing in another future that will send us
6666
// the response metadata (and a body channel) beforehand.
67-
let (tx, rx) = futures::channel::oneshot::channel();
67+
let (tx, rx) = oneshot::channel();
6868

6969
spawn.spawn(async move {
7070
// Get all of the information from Hyper.
@@ -105,7 +105,7 @@ impl Rocket {
105105
fn issue_response<'r>(
106106
&self,
107107
response: Response<'r>,
108-
tx: futures::channel::oneshot::Sender<hyper::Response<hyper::Body>>,
108+
tx: oneshot::Sender<hyper::Response<hyper::Body>>,
109109
) -> impl Future<Output = ()> + 'r {
110110
let result = self.write_response(response, tx);
111111
async move {
@@ -124,7 +124,7 @@ impl Rocket {
124124
fn write_response<'r>(
125125
&self,
126126
mut response: Response<'r>,
127-
tx: futures::channel::oneshot::Sender<hyper::Response<hyper::Body>>,
127+
tx: oneshot::Sender<hyper::Response<hyper::Body>>,
128128
) -> impl Future<Output = io::Result<()>> + 'r {
129129
async move {
130130
let mut hyp_res = hyper::Response::builder();
@@ -785,6 +785,8 @@ impl Rocket {
785785
// We need to get these values before moving `self` into an `Arc`.
786786
let mut shutdown_receiver = self.shutdown_receiver
787787
.take().expect("shutdown receiver has already been used");
788+
789+
#[cfg(feature = "ctrl_c_shutdown")]
788790
let shutdown_handle = self.get_shutdown_handle();
789791

790792
let rocket = Arc::new(self);

0 commit comments

Comments
 (0)