Update to syn 2 (#1862)

This commit is contained in:
David Pedersen
2023-03-18 19:23:27 +00:00
committed by GitHub
parent b315e5b37e
commit 8e1eb8979f
19 changed files with 28 additions and 25 deletions
+1 -2
View File
@@ -30,7 +30,7 @@ ws = ["tokio", "dep:tokio-tungstenite", "dep:sha1", "dep:base64"]
__private_docs = ["tower/full", "dep:tower-http"]
[dependencies]
async-trait = "0.1.43"
async-trait = "0.1.67"
axum-core = { path = "../axum-core", version = "0.3.3" }
bitflags = "1.0"
bytes = "1.0"
@@ -103,7 +103,6 @@ rustversion = "1.0.9"
[dev-dependencies]
anyhow = "1.0"
axum-macros = { path = "../axum-macros", version = "0.3.4", features = ["__private"] }
futures = "0.3"
quickcheck = "1.0"
quickcheck_macros = "1.0"
reqwest = { version = "0.11.14", default-features = false, features = ["json", "stream", "multipart"] }
+1 -1
View File
@@ -32,7 +32,7 @@ pin_project! {
/// body::StreamBody,
/// response::IntoResponse,
/// };
/// use futures::stream::{self, Stream};
/// use futures_util::stream::{self, Stream};
/// use std::io;
///
/// async fn handler() -> StreamBody<impl Stream<Item = io::Result<&'static str>>> {
+1 -1
View File
@@ -225,7 +225,7 @@ use axum::{
body::Body,
http::Request,
};
use futures::future::BoxFuture;
use futures_util::future::BoxFuture;
use tower::{Service, Layer};
use std::task::{Context, Poll};
+1 -1
View File
@@ -32,7 +32,7 @@ use std::{
/// routing::post,
/// Router,
/// };
/// use futures::stream::StreamExt;
/// use futures_util::stream::StreamExt;
///
/// async fn upload(mut multipart: Multipart) {
/// while let Some(mut field) = multipart.next_field().await.unwrap() {
+1 -1
View File
@@ -13,7 +13,7 @@ use std::convert::Infallible;
/// routing::get,
/// Router,
/// };
/// use futures::StreamExt;
/// use futures_util::StreamExt;
///
/// async fn handler(RawQuery(query): RawQuery) {
/// // ...
+2 -2
View File
@@ -117,7 +117,7 @@ where
/// routing::get,
/// Router,
/// };
/// use futures::StreamExt;
/// use futures_util::StreamExt;
///
/// async fn handler(mut stream: BodyStream) {
/// while let Some(chunk) = stream.next().await {
@@ -192,7 +192,7 @@ fn body_stream_traits() {
/// routing::get,
/// Router,
/// };
/// use futures::StreamExt;
/// use futures_util::StreamExt;
///
/// async fn handler(RawBody(body): RawBody) {
/// // ...
+1 -1
View File
@@ -74,7 +74,7 @@
//!
//! ```rust,no_run
//! use axum::{Error, extract::ws::{WebSocket, Message}};
//! use futures::{sink::SinkExt, stream::{StreamExt, SplitSink, SplitStream}};
//! use futures_util::{sink::SinkExt, stream::{StreamExt, SplitSink, SplitStream}};
//!
//! async fn handle_socket(mut socket: WebSocket) {
//! let (mut sender, mut receiver) = socket.split();
+2 -2
View File
@@ -10,7 +10,7 @@
//! };
//! use std::{time::Duration, convert::Infallible};
//! use tokio_stream::StreamExt as _ ;
//! use futures::stream::{self, Stream};
//! use futures_util::stream::{self, Stream};
//!
//! let app = Router::new().route("/sse", get(sse_handler));
//!
@@ -509,7 +509,7 @@ impl<'a> Iterator for MemchrSplit<'a> {
mod tests {
use super::*;
use crate::{routing::get, test_helpers::*, Router};
use futures::stream;
use futures_util::stream;
use std::{collections::HashMap, convert::Infallible};
use tokio_stream::StreamExt as _;
+1 -1
View File
@@ -126,7 +126,7 @@ async fn layer() {
async fn layer_and_handle_error() {
let one = Router::new().route("/foo", get(|| async {}));
let two = Router::new()
.route("/timeout", get(futures::future::pending::<()>))
.route("/timeout", get(std::future::pending::<()>))
.layer(
ServiceBuilder::new()
.layer(HandleErrorLayer::new(|_| async {