Skip to content

Commit 75e6ffb

Browse files
authored
prepare actix-router release 0.5.0 (#2658)
1 parent ad38973 commit 75e6ffb

File tree

4 files changed

+121
-48
lines changed

4 files changed

+121
-48
lines changed

actix-router/CHANGES.md

Lines changed: 118 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,77 @@
33
## Unreleased - 2021-xx-xx
44

55

6+
## 0.5.0 - 2022-02-22
7+
### Added
8+
- `Resource` is now implemented for `&mut Path<_>` and `RefMut<Path<_>>`. [#2568]
9+
- Add `Path::as_str`. [#2590]
10+
- Add `ResourceDef::set_name`. [#373][net#373]
11+
- Add `RouterBuilder::push`. [#2612]
12+
- Implement `IntoPatterns` for `bytestring::ByteString`. [#372][net#372]
13+
- Introduce `ResourceDef::join`. [#380][net#380]
14+
- Introduce `ResourceDef::pattern_iter` to get an iterator over all patterns in a multi-pattern resource. [#373][net#373]
15+
- Support `build_resource_path` on multi-pattern resources. [#2356]
16+
- Support multi-pattern prefixes and joins. [#2356]
17+
18+
### Changed
19+
- `Quoter::requote` now returns `Option<Vec<u8>>`. [#2613]
20+
- `Resource` trait now uses an associated type, `Path`, instead of a generic parameter. [#2568]
21+
- `ResourceDef::pattern` now returns the first pattern in multi-pattern resources. [#2356]
22+
- `ResourceDef::resource_path_from_iter` now takes an `IntoIterator`. [#373][net#373]
23+
- Change signature of `ResourceDef::capture_match_info_fn` to remove `user_data` parameter. [#2612]
24+
- Deprecate `Path::path`. [#2590]
25+
- Disallow prefix routes with tail segments. [#379][net#379]
26+
- Enforce path separators on dynamic prefixes. [#378][net#378]
27+
- Prefix segments now always end with with a segment delimiter or end-of-input. [#2355]
28+
- Prefix segments with trailing slashes define a trailing empty segment. [#2355]
29+
- Re-work `IntoPatterns` trait, adding a `Patterns` enum. [#372][net#372]
30+
- Rename `Path::{len => segment_count}` to be more descriptive of it's purpose. [#370][net#370]
31+
- Rename `ResourceDef::{is_prefix_match => find_match}`. [#373][net#373]
32+
- Rename `ResourceDef::{match_path => capture_match_info}`. [#373][net#373]
33+
- Rename `ResourceDef::{match_path_checked => capture_match_info_fn}`. [#373][net#373]
34+
- Rename `ResourceDef::{resource_path => resource_path_from_iter}`. [#371][net#371]
35+
- Rename `ResourceDef::{resource_path_named => resource_path_from_map}`. [#371][net#371]
36+
- Rename `Router::{*_checked => *_fn}`. [#373][net#373]
37+
- Replace `Option<U>` with `U` in `Router` API. [#2612]
38+
- Return type of `ResourceDef::name` is now `Option<&str>`. [#373][net#373]
39+
- Return type of `ResourceDef::pattern` is now `Option<&str>`. [#373][net#373]
40+
- Minimum supported Rust version (MSRV) is now 1.54.
41+
42+
### Fixed
43+
- `PathDeserializer` now decodes all percent encoded characters in dynamic segments. [#2566]
44+
- Fix `ResourceDef` `PartialEq` implementation. [#373][net#373]
45+
- Fix a bug in multi-patterns where static patterns are interpreted as regex. [#366][net#366]
46+
- Fix segment interpolation leaving `Path` in unintended state after matching. [#368][net#368]
47+
- Improve malformed path error message. [#384][net#384]
48+
- Relax bounds on `Router::recognize*` and `ResourceDef::capture_match_info`. [#2612]
49+
50+
### Removed
51+
- `ResourceDef::name_mut`. [#373][net#373]
52+
- Unused `ResourceInfo`. [#2612]
53+
54+
[#2355]: https://github.com/actix/actix-web/pull/2355
55+
[#2356]: https://github.com/actix/actix-web/pull/2356
56+
[#2566]: https://github.com/actix/actix-net/pull/2566
57+
[#2568]: https://github.com/actix/actix-web/pull/2568
58+
[#2590]: https://github.com/actix/actix-web/pull/2590
59+
[#2612]: https://github.com/actix/actix-web/pull/2612
60+
[#2613]: https://github.com/actix/actix-web/pull/2613
61+
[net#366]: https://github.com/actix/actix-net/pull/366
62+
[net#368]: https://github.com/actix/actix-net/pull/368
63+
[net#368]: https://github.com/actix/actix-net/pull/368
64+
[net#370]: https://github.com/actix/actix-net/pull/370
65+
[net#371]: https://github.com/actix/actix-net/pull/371
66+
[net#372]: https://github.com/actix/actix-net/pull/372
67+
[net#373]: https://github.com/actix/actix-net/pull/373
68+
[net#378]: https://github.com/actix/actix-net/pull/378
69+
[net#379]: https://github.com/actix/actix-net/pull/379
70+
[net#380]: https://github.com/actix/actix-net/pull/380
71+
[net#384]: https://github.com/actix/actix-net/pull/384
72+
73+
74+
<details>
75+
<summary>0.5.0 Pre-Releases</summary>
76+
677
## 0.5.0-rc.3 - 2022-01-31
778
- Remove unused `ResourceInfo`. [#2612]
879
- Add `RouterBuilder::push`. [#2612]
@@ -41,79 +112,81 @@
41112

42113

43114
## 0.5.0-beta.2 - 2021-09-09
44-
- Introduce `ResourceDef::join`. [#380]
45-
- Disallow prefix routes with tail segments. [#379]
46-
- Enforce path separators on dynamic prefixes. [#378]
47-
- Improve malformed path error message. [#384]
115+
- Introduce `ResourceDef::join`. [#380][net#380]
116+
- Disallow prefix routes with tail segments. [#379][net#379]
117+
- Enforce path separators on dynamic prefixes. [#378][net#378]
118+
- Improve malformed path error message. [#384][net#384]
48119
- Prefix segments now always end with with a segment delimiter or end-of-input. [#2355]
49120
- Prefix segments with trailing slashes define a trailing empty segment. [#2355]
50121
- Support multi-pattern prefixes and joins. [#2356]
51122
- `ResourceDef::pattern` now returns the first pattern in multi-pattern resources. [#2356]
52123
- Support `build_resource_path` on multi-pattern resources. [#2356]
53124
- Minimum supported Rust version (MSRV) is now 1.51.
54125

55-
[#378]: https://github.com/actix/actix-net/pull/378
56-
[#379]: https://github.com/actix/actix-net/pull/379
57-
[#380]: https://github.com/actix/actix-net/pull/380
58-
[#384]: https://github.com/actix/actix-net/pull/384
126+
[net#378]: https://github.com/actix/actix-net/pull/378
127+
[net#379]: https://github.com/actix/actix-net/pull/379
128+
[net#380]: https://github.com/actix/actix-net/pull/380
129+
[net#384]: https://github.com/actix/actix-net/pull/384
59130
[#2355]: https://github.com/actix/actix-web/pull/2355
60131
[#2356]: https://github.com/actix/actix-web/pull/2356
61132

62133

63134
## 0.5.0-beta.1 - 2021-07-20
64-
- Fix a bug in multi-patterns where static patterns are interpreted as regex. [#366]
65-
- Introduce `ResourceDef::pattern_iter` to get an iterator over all patterns in a multi-pattern resource. [#373]
66-
- Fix segment interpolation leaving `Path` in unintended state after matching. [#368]
67-
- Fix `ResourceDef` `PartialEq` implementation. [#373]
68-
- Re-work `IntoPatterns` trait, adding a `Patterns` enum. [#372]
69-
- Implement `IntoPatterns` for `bytestring::ByteString`. [#372]
70-
- Rename `Path::{len => segment_count}` to be more descriptive of it's purpose. [#370]
71-
- Rename `ResourceDef::{resource_path => resource_path_from_iter}`. [#371]
72-
- `ResourceDef::resource_path_from_iter` now takes an `IntoIterator`. [#373]
73-
- Rename `ResourceDef::{resource_path_named => resource_path_from_map}`. [#371]
74-
- Rename `ResourceDef::{is_prefix_match => find_match}`. [#373]
75-
- Rename `ResourceDef::{match_path => capture_match_info}`. [#373]
76-
- Rename `ResourceDef::{match_path_checked => capture_match_info_fn}`. [#373]
77-
- Remove `ResourceDef::name_mut` and introduce `ResourceDef::set_name`. [#373]
78-
- Rename `Router::{*_checked => *_fn}`. [#373]
79-
- Return type of `ResourceDef::name` is now `Option<&str>`. [#373]
80-
- Return type of `ResourceDef::pattern` is now `Option<&str>`. [#373]
81-
82-
[#368]: https://github.com/actix/actix-net/pull/368
83-
[#366]: https://github.com/actix/actix-net/pull/366
84-
[#368]: https://github.com/actix/actix-net/pull/368
85-
[#370]: https://github.com/actix/actix-net/pull/370
86-
[#371]: https://github.com/actix/actix-net/pull/371
87-
[#372]: https://github.com/actix/actix-net/pull/372
88-
[#373]: https://github.com/actix/actix-net/pull/373
135+
- Fix a bug in multi-patterns where static patterns are interpreted as regex. [#366][net#366]
136+
- Introduce `ResourceDef::pattern_iter` to get an iterator over all patterns in a multi-pattern resource. [#373][net#373]
137+
- Fix segment interpolation leaving `Path` in unintended state after matching. [#368][net#368]
138+
- Fix `ResourceDef` `PartialEq` implementation. [#373][net#373]
139+
- Re-work `IntoPatterns` trait, adding a `Patterns` enum. [#372][net#372]
140+
- Implement `IntoPatterns` for `bytestring::ByteString`. [#372][net#372]
141+
- Rename `Path::{len => segment_count}` to be more descriptive of it's purpose. [#370][net#370]
142+
- Rename `ResourceDef::{resource_path => resource_path_from_iter}`. [#371][net#371]
143+
- `ResourceDef::resource_path_from_iter` now takes an `IntoIterator`. [#373][net#373]
144+
- Rename `ResourceDef::{resource_path_named => resource_path_from_map}`. [#371][net#371]
145+
- Rename `ResourceDef::{is_prefix_match => find_match}`. [#373][net#373]
146+
- Rename `ResourceDef::{match_path => capture_match_info}`. [#373][net#373]
147+
- Rename `ResourceDef::{match_path_checked => capture_match_info_fn}`. [#373][net#373]
148+
- Remove `ResourceDef::name_mut` and introduce `ResourceDef::set_name`. [#373][net#373]
149+
- Rename `Router::{*_checked => *_fn}`. [#373][net#373]
150+
- Return type of `ResourceDef::name` is now `Option<&str>`. [#373][net#373]
151+
- Return type of `ResourceDef::pattern` is now `Option<&str>`. [#373][net#373]
152+
153+
[net#368]: https://github.com/actix/actix-net/pull/368
154+
[net#366]: https://github.com/actix/actix-net/pull/366
155+
[net#368]: https://github.com/actix/actix-net/pull/368
156+
[net#370]: https://github.com/actix/actix-net/pull/370
157+
[net#371]: https://github.com/actix/actix-net/pull/371
158+
[net#372]: https://github.com/actix/actix-net/pull/372
159+
[net#373]: https://github.com/actix/actix-net/pull/373
160+
161+
</details>
89162

90163

91164
## 0.4.0 - 2021-06-06
92-
- When matching path parameters, `%25` is now kept in the percent-encoded form; no longer decoded to `%`. [#357]
93-
- Path tail patterns now match new lines (`\n`) in request URL. [#360]
94-
- Fixed a safety bug where `Path` could return a malformed string after percent decoding. [#359]
95-
- Methods `Path::{add, add_static}` now take `impl Into<Cow<'static, str>>`. [#345]
165+
- When matching path parameters, `%25` is now kept in the percent-encoded form; no longer decoded to `%`. [#357][net#357]
166+
- Path tail patterns now match new lines (`\n`) in request URL. [#360][net#360]
167+
- Fixed a safety bug where `Path` could return a malformed string after percent decoding. [#359][net#359]
168+
- Methods `Path::{add, add_static}` now take `impl Into<Cow<'static, str>>`. [#345][net#345]
96169

97-
[#345]: https://github.com/actix/actix-net/pull/345
98-
[#357]: https://github.com/actix/actix-net/pull/357
99-
[#359]: https://github.com/actix/actix-net/pull/359
100-
[#360]: https://github.com/actix/actix-net/pull/360
170+
[net#345]: https://github.com/actix/actix-net/pull/345
171+
[net#357]: https://github.com/actix/actix-net/pull/357
172+
[net#359]: https://github.com/actix/actix-net/pull/359
173+
[net#360]: https://github.com/actix/actix-net/pull/360
101174

102175

103176
## 0.3.0 - 2019-12-31
104177
- Version was yanked previously. See https://crates.io/crates/actix-router/0.3.0
105178

106179

107180
## 0.2.7 - 2021-02-06
108-
- Add `Router::recognize_checked` [#247]
181+
- Add `Router::recognize_checked` [#247][net#247]
109182

110-
[#247]: https://github.com/actix/actix-net/pull/247
183+
[net#247]: https://github.com/actix/actix-net/pull/247
111184

112185

113186
## 0.2.6 - 2021-01-09
114-
- Use `bytestring` version range compatible with Bytes v1.0. [#246]
187+
- Use `bytestring` version range compatible with Bytes v1.0. [#246][net#246]
115188

116-
[#246]: https://github.com/actix/actix-net/pull/246
189+
[net#246]: https://github.com/actix/actix-net/pull/246
117190

118191

119192
## 0.2.5 - 2020-09-20

actix-router/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "actix-router"
3-
version = "0.5.0-rc.3"
3+
version = "0.5.0"
44
authors = [
55
"Nikolay Kim <fafhrd91@gmail.com>",
66
"Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>",

actix-web-codegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ edition = "2018"
1515
proc-macro = true
1616

1717
[dependencies]
18-
actix-router = "0.5.0-rc.3"
18+
actix-router = "0.5.0"
1919
proc-macro2 = "1"
2020
quote = "1"
2121
syn = { version = "1", features = ["full", "parsing"] }

actix-web/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ actix-utils = "3"
7272
actix-tls = { version = "3", default-features = false, optional = true }
7373

7474
actix-http = { version = "3.0.0-rc.4", features = ["http2", "ws"] }
75-
actix-router = "0.5.0-rc.3"
75+
actix-router = "0.5.0"
7676
actix-web-codegen = { version = "0.5.0-rc.2", optional = true }
7777

7878
ahash = "0.7"

0 commit comments

Comments
 (0)