Skip to content

Commit 7c4e076

Browse files
committed
fix: ci/cd
1 parent 26c7a4c commit 7c4e076

6 files changed

Lines changed: 24 additions & 19 deletions

File tree

tako-core/src/extractors/range.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
//! - `bytes=-LENGTH` — suffix ("last LENGTH bytes").
99
//!
1010
//! Multi-range requests (`bytes=0-100,200-300`) parse into the full
11-
//! [`Range::specs`] list; responders that only support a single range can
12-
//! call [`Range::single`] to fetch the first spec.
11+
//! [`Range::specs`](struct.Range.html#structfield.specs) list; responders that
12+
//! only support a single range can call
13+
//! [`Range::single`](struct.Range.html#method.single) to fetch the first spec.
1314
1415
use http::HeaderMap;
1516
use http::StatusCode;

tako-core/src/openapi/ui.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//! # Examples
1111
//!
1212
//! ```rust,ignore
13-
//! use tako::openapi::ui::{SwaggerUi, Scalar, `RapiDoc`};
13+
//! use tako::openapi::ui::{SwaggerUi, Scalar, RapiDoc};
1414
//! use tako::{router::Router, Method};
1515
//!
1616
//! let mut router = Router::new();
@@ -25,9 +25,9 @@
2525
//! Scalar::new("/openapi.json")
2626
//! });
2727
//!
28-
//! // Serve `RapiDoc` at /rapidoc
28+
//! // Serve RapiDoc at /rapidoc
2929
//! router.route(Method::GET, "/rapidoc", |_| async {
30-
//! `RapiDoc`::new("/openapi.json")
30+
//! RapiDoc::new("/openapi.json")
3131
//! });
3232
//! ```
3333
@@ -217,10 +217,10 @@ impl Responder for Scalar {
217217
/// # Examples
218218
///
219219
/// ```rust,ignore
220-
/// use tako::openapi::ui::`RapiDoc`;
220+
/// use tako::openapi::ui::RapiDoc;
221221
///
222-
/// async fn rapidoc_handler(_: tako::types::Request) -> `RapiDoc` {
223-
/// `RapiDoc`::new("/openapi.json")
222+
/// async fn rapidoc_handler(_: tako::types::Request) -> RapiDoc {
223+
/// RapiDoc::new("/openapi.json")
224224
/// .title("My API")
225225
/// .theme(RapiDocTheme::Dark)
226226
/// }
@@ -339,10 +339,10 @@ impl Responder for RapiDoc {
339339
/// # Examples
340340
///
341341
/// ```rust,ignore
342-
/// use tako::openapi::ui::`Redoc`;
342+
/// use tako::openapi::ui::Redoc;
343343
///
344-
/// async fn redoc_handler(_: tako::types::Request) -> `Redoc` {
345-
/// `Redoc`::new("/openapi.json")
344+
/// async fn redoc_handler(_: tako::types::Request) -> Redoc {
345+
/// Redoc::new("/openapi.json")
346346
/// .title("My API")
347347
/// }
348348
/// ```

tako-core/src/route.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,12 +392,12 @@ impl Route {
392392
/// # Examples
393393
///
394394
/// ```rust,ignore
395-
/// use tako::openapi::{OpenApiParameter, `ParameterLocation`};
395+
/// use tako::openapi::{OpenApiParameter, ParameterLocation};
396396
///
397397
/// router.route(Method::GET, "/users", list_users)
398398
/// .parameter(OpenApiParameter {
399399
/// name: "limit".to_string(),
400-
/// location: `ParameterLocation`::Query,
400+
/// location: ParameterLocation::Query,
401401
/// description: Some("Maximum number of results".to_string()),
402402
/// required: false,
403403
/// });

tako-extractors/src/uri_parts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
//!
1010
//! `Host` and `Scheme` honor `Forwarded` / `X-Forwarded-*` headers **only** when
1111
//! the connection's peer IP appears in a configured trusted-proxy list. Insert
12-
//! a [`UriPartsConfig`] into the application state (or request extensions) to
13-
//! enable that path. Without configuration the extractors fall back to the
12+
//! a `UriPartsConfig` (see [`UriPartsConfig`](crate::uri_parts::UriPartsConfig))
13+
//! into the application state (or request extensions) to enable that path. Without configuration the extractors fall back to the
1414
//! `Host` header and the transport-resolved scheme — never an attacker-supplied
1515
//! `X-Forwarded-Host`, which previously enabled cache-poisoning and open
1616
//! redirect classes when the server was directly reachable.

tako-extractors/src/zero_copy_extractors/bytes.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ pub struct BodySliceBorrowed<'a>(pub &'a [u8]);
7070

7171
impl<'a> FromRequest<'a> for BodySliceBorrowed<'a> {
7272
/// Mirrors [`BytesBorrowed::Error`]. Previously this extractor returned
73-
/// [`Infallible`] and swallowed a body-read failure by caching an empty
74-
/// slice, which made downstream parsers report "empty body" for what was
75-
/// really a transport-level error. Propagate the underlying read failure
76-
/// so the caller can distinguish the two.
73+
/// [`std::convert::Infallible`] and swallowed a body-read failure by caching
74+
/// an empty slice, which made downstream parsers report "empty body" for
75+
/// what was really a transport-level error. Propagate the underlying read
76+
/// failure so the caller can distinguish the two.
7777
type Error = BytesReadError;
7878

7979
fn from_request(

tako-rs/tests/middleware.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,7 @@ async fn tenant_extracted_from_header() {
978978
assert_eq!(body_str(resp).await, "acme");
979979
}
980980

981+
#[cfg(feature = "plugins")]
981982
#[tokio::test]
982983
async fn compression_compresses_plain_response() {
983984
use tako::plugins::TakoPlugin;
@@ -1012,6 +1013,7 @@ async fn compression_compresses_plain_response() {
10121013
);
10131014
}
10141015

1016+
#[cfg(feature = "plugins")]
10151017
#[tokio::test]
10161018
async fn compression_skips_when_request_authenticated() {
10171019
use tako::plugins::TakoPlugin;
@@ -1046,6 +1048,7 @@ async fn compression_skips_when_request_authenticated() {
10461048
);
10471049
}
10481050

1051+
#[cfg(feature = "plugins")]
10491052
#[tokio::test]
10501053
async fn compression_skips_when_response_sets_cookie() {
10511054
use tako::plugins::TakoPlugin;
@@ -1078,6 +1081,7 @@ async fn compression_skips_when_response_sets_cookie() {
10781081
);
10791082
}
10801083

1084+
#[cfg(feature = "plugins")]
10811085
#[tokio::test]
10821086
async fn compression_opt_out_of_crime_mitigation() {
10831087
use tako::plugins::TakoPlugin;

0 commit comments

Comments
 (0)