1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 15:51:06 +01:00

Use re-exported bytes items from instead of using them directly (#139)

This commit is contained in:
Yuki Okushi 2020-12-01 10:21:56 +09:00 committed by GitHub
parent 699a98493b
commit f970d90894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 9 additions and 14 deletions

View File

@ -26,4 +26,3 @@ time = { version = "0.2.7", default-features = false, features = ["std"] }
[dev-dependencies]
actix-rt = "1.1.1"
actix-http = "2.0.0"
bytes = "0.5.3"

View File

@ -21,7 +21,6 @@ path = "src/lib.rs"
[dependencies]
actix-web = { version = "3.0.0", default_features = false }
actix-rt = "1.1.1"
bytes = "0.5"
futures-util = { version = "0.3.5", default-features = false }
derive_more = "0.99"
prost = "0.6.0"

View File

@ -11,7 +11,6 @@ authors = [
actix-web = "3.0.0"
actix-protobuf = { path = "../../" }
bytes = "0.5"
env_logger = "0.7"
prost = "0.6.0"
prost-derive = "0.6.0"

View File

@ -8,7 +8,6 @@ use std::pin::Pin;
use std::task;
use std::task::Poll;
use bytes::BytesMut;
use prost::DecodeError as ProtoBufDecodeError;
use prost::EncodeError as ProtoBufEncodeError;
use prost::Message;
@ -16,6 +15,7 @@ use prost::Message;
use actix_web::dev::{HttpResponseBuilder, Payload};
use actix_web::error::{Error, PayloadError, ResponseError};
use actix_web::http::header::{CONTENT_LENGTH, CONTENT_TYPE};
use actix_web::web::BytesMut;
use actix_web::{FromRequest, HttpMessage, HttpRequest, HttpResponse, Responder};
use futures_util::future::{ready, FutureExt, LocalBoxFuture, Ready};
use futures_util::StreamExt;

View File

@ -22,7 +22,6 @@ cookie-session = ["actix-web/secure-cookies"]
[dependencies]
actix-web = { version = "3.0.0", default_features = false }
actix-service = "1.0.6"
bytes = "0.5.3"
derive_more = "0.99.2"
futures-util = { version = "0.3.4", default-features = false }
serde = "1.0"

View File

@ -397,8 +397,8 @@ where
#[cfg(test)]
mod tests {
use super::*;
use actix_web::web::Bytes;
use actix_web::{test, web, App};
use bytes::Bytes;
#[actix_rt::test]
async fn cookie_session() {

View File

@ -22,7 +22,6 @@ path = "src/lib.rs"
[dependencies]
actix-web = { version = "3.0.0", default_features = false }
base64 = "0.13"
bytes = "0.5"
futures-util = { version = "0.3", default-features = false }
[dev-dependencies]

View File

@ -3,7 +3,7 @@ use std::fmt;
use std::str;
use actix_web::http::header::{HeaderValue, IntoHeaderValue, InvalidHeaderValue};
use bytes::{BufMut, BytesMut};
use actix_web::web::{BufMut, BytesMut};
use crate::headers::authorization::errors::ParseError;
use crate::headers::authorization::Scheme;

View File

@ -2,7 +2,7 @@ use std::borrow::Cow;
use std::fmt;
use actix_web::http::header::{HeaderValue, IntoHeaderValue, InvalidHeaderValue};
use bytes::{BufMut, BytesMut};
use actix_web::web::{BufMut, BytesMut};
use crate::headers::authorization::errors::ParseError;
use crate::headers::authorization::scheme::Scheme;

View File

@ -6,7 +6,7 @@ use std::fmt;
use std::str;
use actix_web::http::header::{HeaderValue, IntoHeaderValue, InvalidHeaderValue};
use bytes::{BufMut, Bytes, BytesMut};
use actix_web::web::{BufMut, Bytes, BytesMut};
use super::Challenge;
use crate::utils;

View File

@ -3,7 +3,7 @@ use std::fmt;
use std::str;
use actix_web::http::header::{HeaderValue, IntoHeaderValue, InvalidHeaderValue};
use bytes::{BufMut, Bytes, BytesMut};
use actix_web::web::{BufMut, Bytes, BytesMut};
use super::super::Challenge;
use super::{BearerBuilder, Error};

View File

@ -1,7 +1,7 @@
use std::fmt::{Debug, Display};
use actix_web::http::header::IntoHeaderValue;
use bytes::Bytes;
use actix_web::web::Bytes;
pub mod basic;
pub mod bearer;

View File

@ -1,6 +1,6 @@
use std::str;
use bytes::BytesMut;
use actix_web::web::BytesMut;
enum State {
YieldStr,
@ -55,7 +55,7 @@ pub fn put_quoted(buf: &mut BytesMut, value: &str) {
mod tests {
use std::str;
use bytes::BytesMut;
use actix_web::web::BytesMut;
use super::put_quoted;