From fd990f410d3ece7d493d68c292a202085898a25c Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 29 Feb 2024 20:23:21 +0100 Subject: [PATCH] static --- src/fetch/mod.rs | 4 ++-- src/fetch/webfinger.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fetch/mod.rs b/src/fetch/mod.rs index aed3f21..3436949 100644 --- a/src/fetch/mod.rs +++ b/src/fetch/mod.rs @@ -53,8 +53,8 @@ pub async fn fetch_object_http( url: &Url, data: &Data, ) -> Result, Error> { - const CONTENT_TYPE: HeaderValue = HeaderValue::from_static(FEDERATION_CONTENT_TYPE); - const ALT_CONTENT_TYPE: HeaderValue = HeaderValue::from_static( + static CONTENT_TYPE: HeaderValue = HeaderValue::from_static(FEDERATION_CONTENT_TYPE); + static ALT_CONTENT_TYPE: HeaderValue = HeaderValue::from_static( r#"application/ld+json; profile="https://www.w3.org/ns/activitystreams"#, ); let res = fetch_object_http_with_accept(url, data, &CONTENT_TYPE).await?; diff --git a/src/fetch/webfinger.rs b/src/fetch/webfinger.rs index dbf0069..7da2fdf 100644 --- a/src/fetch/webfinger.rs +++ b/src/fetch/webfinger.rs @@ -35,7 +35,7 @@ impl WebFingerError { } /// The content-type for webfinger responses. -pub const WEBFINGER_CONTENT_TYPE: HeaderValue = HeaderValue::from_static("application/jrd+json"); +pub static WEBFINGER_CONTENT_TYPE: HeaderValue = HeaderValue::from_static("application/jrd+json"); /// Takes an identifier of the form `name@example.com`, and returns an object of `Kind`. ///