1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-23 16:21:06 +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
## Unreleased - 2021-xx-xx
### Changed
* Update `language-tags` to `0.3`.
## 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-util = { version = "0.3.7", default-features = false }
itoa = "0.4"
language-tags = "0.2"
language-tags = "0.3"
once_cell = "1.5"
log = "0.4"
mime = "0.3"

View File

@ -9,6 +9,7 @@
### Changed
* `header` mod is now public. [#2171]
* `uri` mod is now public. [#2171]
* Update `language-tags` to `0.3`.
### Removed
* 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"
httparse = "1.3"
itoa = "0.4"
language-tags = "0.2"
language-tags = "0.3"
local-channel = "0.1"
once_cell = "1.5"
log = "0.4"

View File

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

View File

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