Skip to content

Commit

Permalink
fix: doc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Dec 31, 2023
1 parent ce3515a commit 281f653
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
7 changes: 4 additions & 3 deletions viz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ otel-tracing = ["otel", "viz-core/otel-tracing"]
otel-metrics = ["otel", "viz-core/otel-metrics"]
otel-prometheus = ["handlers", "viz-handlers?/prometheus"]

rustls = ["dep:rustls-pemfile", "dep:tokio-rustls"]
native-tls = ["dep:tokio-native-tls"]
rustls = ["dep:rustls-pemfile", "dep:tokio-rustls", "dep:futures-util"]
native-tls = ["dep:tokio-native-tls", "dep:futures-util"]

[dependencies]
viz-core.workspace = true
Expand All @@ -75,7 +75,8 @@ viz-macros = { workspace = true, optional = true }

hyper.workspace = true
hyper-util.workspace = true
futures-util.workspace = true

futures-util = { workspace = true, optional = true }

rustls-pemfile = { workspace = true, optional = true }

Expand Down
3 changes: 1 addition & 2 deletions viz/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,8 @@
//! ```
//! # use std::time::Duration;
//! # use viz::{
//! # get, types::Params, Transform, HandlerExt, IntoResponse, IntoHandler,
//! # async_trait, get, types::Params, Transform, HandlerExt, IntoResponse, IntoHandler,
//! # Request, Response, ResponseExt, Result, Router, StatusCode, Next, Handler,
//! # future::BoxFuture,
//! # };
//! async fn index(_: Request) -> Result<Response> {
//! Ok(StatusCode::OK.into_response())
Expand Down
3 changes: 1 addition & 2 deletions viz/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::{
sync::Arc,
};

use futures_util::FutureExt;
use hyper_util::{
rt::{TokioExecutor, TokioIo},
server::conn::auto::Builder,
Expand All @@ -17,7 +16,7 @@ use tokio::{
sync::watch,
};

use crate::{Responder, Router, Tree};
use crate::{future::FutureExt, Responder, Router, Tree};

mod accept;
pub use accept::Accept;
Expand Down

0 comments on commit 281f653

Please sign in to comment.