mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-17 23:19:06 +00:00
Move a debug-only 'use' in 'from_data.rs' to the locations where it is actually used.
This commit is contained in:
parent
e41abc09e5
commit
dcd4068ca0
@ -2,7 +2,6 @@ use std::borrow::Borrow;
|
||||
|
||||
use futures_util::future::BoxFuture;
|
||||
use futures_util::future::{ready, FutureExt};
|
||||
use tokio::io::AsyncReadExt;
|
||||
|
||||
use crate::outcome::{self, IntoOutcome};
|
||||
use crate::outcome::Outcome::*;
|
||||
@ -592,6 +591,7 @@ impl FromDataSimple for String {
|
||||
|
||||
#[inline(always)]
|
||||
fn from_data(_: &Request<'_>, data: Data) -> FromDataFuture<'static, Self, Self::Error> {
|
||||
use tokio::io::AsyncReadExt;
|
||||
Box::pin(async {
|
||||
let mut string = String::new();
|
||||
let mut reader = data.open();
|
||||
@ -609,6 +609,7 @@ impl FromDataSimple for Vec<u8> {
|
||||
|
||||
#[inline(always)]
|
||||
fn from_data(_: &Request<'_>, data: Data) -> FromDataFuture<'static, Self, Self::Error> {
|
||||
use tokio::io::AsyncReadExt;
|
||||
Box::pin(async {
|
||||
let mut stream = data.open();
|
||||
let mut buf = Vec::new();
|
||||
|
Loading…
Reference in New Issue
Block a user