Skip to content

Commit

Permalink
Fix a few unused import warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
jebrosen committed Sep 21, 2019
1 parent 165b742 commit 25adb9d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/lib/src/rocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn hyper_service_fn(
// because the response body might borrow from the request. Instead,
// we do the body writing in another future that will send us
// the response metadata (and a body channel) beforehand.
let (tx, rx) = futures::channel::oneshot::channel();
let (tx, rx) = oneshot::channel();

spawn.spawn(async move {
// Get all of the information from Hyper.
Expand Down Expand Up @@ -104,7 +104,7 @@ impl Rocket {
fn issue_response<'r>(
&self,
response: Response<'r>,
tx: futures::channel::oneshot::Sender<hyper::Response<hyper::Body>>,
tx: oneshot::Sender<hyper::Response<hyper::Body>>,
) -> impl Future<Output = ()> + 'r {
let result = self.write_response(response, tx);
async move {
Expand All @@ -123,7 +123,7 @@ impl Rocket {
fn write_response<'r>(
&self,
mut response: Response<'r>,
tx: futures::channel::oneshot::Sender<hyper::Response<hyper::Body>>,
tx: oneshot::Sender<hyper::Response<hyper::Body>>,
) -> impl Future<Output = io::Result<()>> + 'r {
async move {
let mut hyp_res = hyper::Response::builder();
Expand Down Expand Up @@ -763,6 +763,8 @@ impl Rocket {
// We need to get these values before moving `self` into an `Arc`.
let mut shutdown_receiver = self.shutdown_receiver
.take().expect("shutdown receiver has already been used");

#[cfg(feature = "ctrl_c_shutdown")]
let shutdown_handle = self.get_shutdown_handle();

let rocket = Arc::new(self);
Expand Down

0 comments on commit 25adb9d

Please sign in to comment.