mirror of https://github.com/rwf2/Rocket.git
Fix a few unused import warnings.
This commit is contained in:
parent
cd6a80c230
commit
a0d2651e38
|
@ -64,7 +64,7 @@ fn hyper_service_fn(
|
||||||
// because the response body might borrow from the request. Instead,
|
// because the response body might borrow from the request. Instead,
|
||||||
// we do the body writing in another future that will send us
|
// we do the body writing in another future that will send us
|
||||||
// the response metadata (and a body channel) beforehand.
|
// the response metadata (and a body channel) beforehand.
|
||||||
let (tx, rx) = futures::channel::oneshot::channel();
|
let (tx, rx) = oneshot::channel();
|
||||||
|
|
||||||
spawn.spawn(async move {
|
spawn.spawn(async move {
|
||||||
// Get all of the information from Hyper.
|
// Get all of the information from Hyper.
|
||||||
|
@ -105,7 +105,7 @@ impl Rocket {
|
||||||
fn issue_response<'r>(
|
fn issue_response<'r>(
|
||||||
&self,
|
&self,
|
||||||
response: Response<'r>,
|
response: Response<'r>,
|
||||||
tx: futures::channel::oneshot::Sender<hyper::Response<hyper::Body>>,
|
tx: oneshot::Sender<hyper::Response<hyper::Body>>,
|
||||||
) -> impl Future<Output = ()> + 'r {
|
) -> impl Future<Output = ()> + 'r {
|
||||||
let result = self.write_response(response, tx);
|
let result = self.write_response(response, tx);
|
||||||
async move {
|
async move {
|
||||||
|
@ -124,7 +124,7 @@ impl Rocket {
|
||||||
fn write_response<'r>(
|
fn write_response<'r>(
|
||||||
&self,
|
&self,
|
||||||
mut response: Response<'r>,
|
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 {
|
) -> impl Future<Output = io::Result<()>> + 'r {
|
||||||
async move {
|
async move {
|
||||||
let mut hyp_res = hyper::Response::builder();
|
let mut hyp_res = hyper::Response::builder();
|
||||||
|
@ -785,6 +785,8 @@ impl Rocket {
|
||||||
// We need to get these values before moving `self` into an `Arc`.
|
// We need to get these values before moving `self` into an `Arc`.
|
||||||
let mut shutdown_receiver = self.shutdown_receiver
|
let mut shutdown_receiver = self.shutdown_receiver
|
||||||
.take().expect("shutdown receiver has already been used");
|
.take().expect("shutdown receiver has already been used");
|
||||||
|
|
||||||
|
#[cfg(feature = "ctrl_c_shutdown")]
|
||||||
let shutdown_handle = self.get_shutdown_handle();
|
let shutdown_handle = self.get_shutdown_handle();
|
||||||
|
|
||||||
let rocket = Arc::new(self);
|
let rocket = Arc::new(self);
|
||||||
|
|
Loading…
Reference in New Issue