1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 17:52:56 +01:00

Update dependency "language-tags" (#2188)

This commit is contained in:
Voldracarno Draconor 2021-04-28 02:23:12 +02:00 committed by GitHub
parent 6a29a50f25
commit 1fcf92e11f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 18 deletions

View File

@ -1,6 +1,8 @@
# Changes # Changes
## Unreleased - 2021-xx-xx ## Unreleased - 2021-xx-xx
### Changed
* Update `language-tags` to `0.3`.
## 4.0.0-beta.6 - 2021-04-17 ## 4.0.0-beta.6 - 2021-04-17

View File

@ -78,7 +78,7 @@ encoding_rs = "0.8"
futures-core = { version = "0.3.7", default-features = false } futures-core = { version = "0.3.7", default-features = false }
futures-util = { version = "0.3.7", default-features = false } futures-util = { version = "0.3.7", default-features = false }
itoa = "0.4" itoa = "0.4"
language-tags = "0.2" language-tags = "0.3"
once_cell = "1.5" once_cell = "1.5"
log = "0.4" log = "0.4"
mime = "0.3" mime = "0.3"

View File

@ -9,6 +9,7 @@
### Changed ### Changed
* `header` mod is now public. [#2171] * `header` mod is now public. [#2171]
* `uri` mod is now public. [#2171] * `uri` mod is now public. [#2171]
* Update `language-tags` to `0.3`.
### Removed ### Removed
* Stop re-exporting `http` crate's `HeaderMap` types in addition to ours. [#2171] * Stop re-exporting `http` crate's `HeaderMap` types in addition to ours. [#2171]

View File

@ -57,7 +57,7 @@ h2 = "0.3.1"
http = "0.2.2" http = "0.2.2"
httparse = "1.3" httparse = "1.3"
itoa = "0.4" itoa = "0.4"
language-tags = "0.2" language-tags = "0.3"
local-channel = "0.1" local-channel = "0.1"
once_cell = "1.5" once_cell = "1.5"
log = "0.4" log = "0.4"

View File

@ -24,14 +24,11 @@ crate::__define_common_header! {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use language_tags::langtag;
/// use actix_web::HttpResponse; /// use actix_web::HttpResponse;
/// use actix_web::http::header::{AcceptLanguage, LanguageTag, qitem}; /// use actix_web::http::header::{AcceptLanguage, LanguageTag, qitem};
/// ///
/// let mut builder = HttpResponse::Ok(); /// let mut builder = HttpResponse::Ok();
/// let mut langtag: LanguageTag = Default::default(); /// let langtag = LanguageTag::parse("en-US").unwrap();
/// langtag.language = Some("en".to_owned());
/// langtag.region = Some("US".to_owned());
/// builder.insert_header( /// builder.insert_header(
/// AcceptLanguage(vec![ /// AcceptLanguage(vec![
/// qitem(langtag), /// qitem(langtag),
@ -40,16 +37,15 @@ crate::__define_common_header! {
/// ``` /// ```
/// ///
/// ``` /// ```
/// use language_tags::langtag;
/// use actix_web::HttpResponse; /// use actix_web::HttpResponse;
/// use actix_web::http::header::{AcceptLanguage, QualityItem, q, qitem}; /// use actix_web::http::header::{AcceptLanguage, LanguageTag, QualityItem, q, qitem};
/// ///
/// let mut builder = HttpResponse::Ok(); /// let mut builder = HttpResponse::Ok();
/// builder.insert_header( /// builder.insert_header(
/// AcceptLanguage(vec![ /// AcceptLanguage(vec![
/// qitem(langtag!(da)), /// qitem(LanguageTag::parse("da").unwrap()),
/// QualityItem::new(langtag!(en;;;GB), q(800)), /// QualityItem::new(LanguageTag::parse("en-GB").unwrap(), q(800)),
/// QualityItem::new(langtag!(en), q(700)), /// QualityItem::new(LanguageTag::parse("en").unwrap(), q(700)),
/// ]) /// ])
/// ); /// );
/// ``` /// ```

View File

@ -24,28 +24,26 @@ crate::__define_common_header! {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use language_tags::langtag;
/// use actix_web::HttpResponse; /// use actix_web::HttpResponse;
/// use actix_web::http::header::{ContentLanguage, qitem}; /// use actix_web::http::header::{ContentLanguage, LanguageTag, qitem};
/// ///
/// let mut builder = HttpResponse::Ok(); /// let mut builder = HttpResponse::Ok();
/// builder.insert_header( /// builder.insert_header(
/// ContentLanguage(vec![ /// ContentLanguage(vec![
/// qitem(langtag!(en)), /// qitem(LanguageTag::parse("en").unwrap()),
/// ]) /// ])
/// ); /// );
/// ``` /// ```
/// ///
/// ``` /// ```
/// use language_tags::langtag;
/// use actix_web::HttpResponse; /// use actix_web::HttpResponse;
/// use actix_web::http::header::{ContentLanguage, qitem}; /// use actix_web::http::header::{ContentLanguage, LanguageTag, qitem};
/// ///
/// let mut builder = HttpResponse::Ok(); /// let mut builder = HttpResponse::Ok();
/// builder.insert_header( /// builder.insert_header(
/// ContentLanguage(vec![ /// ContentLanguage(vec![
/// qitem(langtag!(da)), /// qitem(LanguageTag::parse("da").unwrap()),
/// qitem(langtag!(en;;;GB)), /// qitem(LanguageTag::parse("en-GB").unwrap()),
/// ]) /// ])
/// ); /// );
/// ``` /// ```