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:
parent
6a29a50f25
commit
1fcf92e11f
@ -1,6 +1,8 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2021-xx-xx
|
||||
### Changed
|
||||
* Update `language-tags` to `0.3`.
|
||||
|
||||
|
||||
## 4.0.0-beta.6 - 2021-04-17
|
||||
|
@ -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"
|
||||
|
@ -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]
|
||||
|
@ -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"
|
||||
|
@ -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)),
|
||||
/// ])
|
||||
/// );
|
||||
/// ```
|
||||
|
@ -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()),
|
||||
/// ])
|
||||
/// );
|
||||
/// ```
|
||||
|
Loading…
Reference in New Issue
Block a user