Skip to content

Commit 8150f29

Browse files
committed
Bump version to 0.21.0
1 parent 212f0c9 commit 8150f29

2 files changed

Lines changed: 20 additions & 11 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mediatype"
3-
version = "0.20.0"
3+
version = "0.21.0"
44
edition = "2021"
55
authors = ["picoHz <picoHz@outlook.com>"]
66
description = "MIME Media-type parsing"

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
MIME Media-type parsing for Rust
66

77
[![Crates.io](https://img.shields.io/crates/v/mediatype.svg)](https://crates.io/crates/mediatype)
8-
[![dependency status](https://deps.rs/crate/mediatype/0.19.3/status.svg)](https://deps.rs/crate/mediatype/0.19.3)
8+
[![dependency status](https://deps.rs/crate/mediatype/0.21.0/status.svg)](https://deps.rs/crate/mediatype/0.21.0)
99
[![GitHub license](https://img.shields.io/github/license/picoHz/mediatype.svg)](https://github.com/picoHz/mediatype/blob/main/LICENSE)
1010
[![Rustdoc](https://img.shields.io/badge/doc-rustdoc-green.svg)](https://docs.rs/mediatype)
1111
![Rust](https://github.com/picoHz/mediatype/workflows/Rust/badge.svg)
@@ -23,7 +23,8 @@ MIME Media-type parsing for Rust
2323

2424
## Parsing
2525

26-
`MediaType::parse` runs a zero-copy parsing: A `MediaType` borrows the input string instead of copying it.
26+
`MediaType::parse` runs a zero-copy parsing: A `MediaType` borrows the input
27+
string instead of copying it.
2728

2829
If you need an owned type, use [`MediaTypeBuf`](#owned-type).
2930

@@ -41,9 +42,12 @@ assert_eq!(svg.get_param(CHARSET), Some(UTF_8));
4142

4243
## Construction
4344

44-
`MediaType` is const-constructible. It can be defined as a constant.
45+
`MediaType` is const-constructible. It can be defined as a constant.
4546

46-
Predefind names and values are defined in [`names`](https://docs.rs/mediatype/latest/mediatype/names/index.html) and [`values`](https://docs.rs/mediatype/latest/mediatype/values/index.html) modules.
47+
Predefind names and values are defined in
48+
[`names`](https://docs.rs/mediatype/latest/mediatype/names/index.html) and
49+
[`values`](https://docs.rs/mediatype/latest/mediatype/values/index.html)
50+
modules.
4751

4852
```rust
4953
use mediatype::{names::*, values::*, media_type, MediaType};
@@ -76,7 +80,8 @@ assert!(text_plain_lower !=
7680

7781
### Duplicate Parameter Names
7882

79-
The parser does not report duplicate parameter names as an error, but `MediaType` recognizes only the last value.
83+
The parser does not report duplicate parameter names as an error, but
84+
`MediaType` recognizes only the last value.
8085

8186
```rust
8287
let text_plain = MediaType::parse(
@@ -98,9 +103,10 @@ assert_eq!(
98103
```
99104

100105
## Owned Type
101-
102-
[`MediaTypeBuf`](https://docs.rs/mediatype/latest/mediatype/struct.MediaTypeBuf.html) is an owned version of `MediaType`.
103-
It is immutable but optimized for minimal stack and heap usage.
106+
107+
[`MediaTypeBuf`](https://docs.rs/mediatype/latest/mediatype/struct.MediaTypeBuf.html)
108+
is an owned version of `MediaType`. It is immutable but optimized for minimal
109+
stack and heap usage.
104110

105111
```rust
106112
use mediatype::{names::*, values::*, MediaType, MediaTypeBuf};
@@ -116,7 +122,9 @@ assert_eq!(text_markdown.to_string(), "text/markdown; charset=UTF-8");
116122

117123
## MediaTypeList
118124

119-
[`MediaTypeList`](https://docs.rs/mediatype/latest/mediatype/struct.MediaTypeList.html) parses a comma-separated list of `MediaType`s used in the HTTP `Accept` header. ([RFC 7231](https://www.rfc-editor.org/rfc/rfc7231#section-5.3.2))
125+
[`MediaTypeList`](https://docs.rs/mediatype/latest/mediatype/struct.MediaTypeList.html)
126+
parses a comma-separated list of `MediaType`s used in the HTTP `Accept` header.
127+
([RFC 7231](https://www.rfc-editor.org/rfc/rfc7231#section-5.3.2))
120128

121129
```rust
122130
use mediatype::{MediaType, MediaTypeList};
@@ -133,7 +141,8 @@ assert_eq!(list.next(), None);
133141

134142
## Serialize and Deserialize
135143

136-
To enable serialization and deserialization, specify `serde` feature in `Cargo.toml`.
144+
To enable serialization and deserialization, specify `serde` feature in
145+
`Cargo.toml`.
137146

138147
```toml
139148
mediatype = { version = "...", features = ["serde"] }

0 commit comments

Comments
 (0)