Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions crates/lib/docs_rs_headers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ edition = "2024"

[dependencies]
anyhow = { workspace = true }
axum-core = "0.5.5"
axum-extra = { workspace = true }
askama = { workspace = true }
axum-core = "0.5.5"
derive_more = { workspace = true }
docs_rs_types = { path = "../docs_rs_types" }
docs_rs_uri = { path = "../docs_rs_uri" }
headers = "0.4.1"
http = { workspace = true }
itertools = { workspace = true }
md5 = "0.8.0"
serde = { workspace = true }

[dev-dependencies]
axum-extra = { workspace = true }
serde_json = { workspace = true }
test-case = { workspace = true }
tokio = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/lib/docs_rs_headers/src/canonical_url.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use askama::filters::HtmlSafe;
use axum_extra::headers::{Header, HeaderName, HeaderValue};
use docs_rs_uri::EscapedURI;
use headers::{Header, HeaderName, HeaderValue};
use http::uri::Uri;
use serde::Serialize;
use std::{fmt, ops::Deref};
Expand Down Expand Up @@ -39,7 +39,7 @@ impl Header for CanonicalUrl {
&http::header::LINK
}

fn decode<'i, I>(_values: &mut I) -> Result<Self, axum_extra::headers::Error>
fn decode<'i, I>(_values: &mut I) -> Result<Self, headers::Error>
where
I: Iterator<Item = &'i HeaderValue>,
{
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/docs_rs_headers/src/etag.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use axum_extra::headers::ETag;
use headers::ETag;
use std::io::{self, Write};

/// compute our etag header value from some content
Expand Down
4 changes: 2 additions & 2 deletions crates/lib/docs_rs_headers/src/if_none_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

#[allow(clippy::disallowed_types)]
mod header_impl {
use axum_extra::headers::{self, ETag, Header, IfNoneMatch as OriginalIfNoneMatch};
use derive_more::Deref;
use headers::{self, ETag, Header, IfNoneMatch as OriginalIfNoneMatch};

#[derive(Debug, Clone, PartialEq, Deref)]
pub struct IfNoneMatch(pub axum_extra::headers::IfNoneMatch);
pub struct IfNoneMatch(pub headers::IfNoneMatch);

impl Header for IfNoneMatch {
fn name() -> &'static http::HeaderName {
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/docs_rs_headers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ mod surrogate_key;
#[cfg(test)]
mod testing;

pub use axum_extra::headers::ETag;
pub use canonical_url::CanonicalUrl;
pub use etag::{ETagComputer, compute_etag};
pub use headers::ETag;
pub use if_none_match::IfNoneMatch;
pub use surrogate_key::{SURROGATE_KEY, SurrogateKey, SurrogateKeys};

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/docs_rs_headers/src/surrogate_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
//! https://www.fastly.com/documentation/reference/http/http-headers/Surrogate-Key/haeders.surrogate keys

use anyhow::{Context as _, bail};
use axum_extra::headers::{self, Header};
use derive_more::Deref;
use docs_rs_types::KrateName;
use headers::{self, Header};
use http::{HeaderName, HeaderValue};
use itertools::Itertools as _;
use std::{collections::BTreeSet, fmt::Display, iter, str::FromStr};
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/docs_rs_headers/src/testing.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use axum_extra::headers::{self, Header, HeaderMapExt};
use headers::{self, Header, HeaderMapExt};
use http::{HeaderMap, HeaderValue};

pub(crate) fn test_typed_decode<H, V>(value: V) -> Result<Option<H>, headers::Error>
Expand Down
Loading