@@ -5,29 +5,52 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
-
9
8
## [ Unreleased]
10
9
11
10
### Added
12
11
13
- - Adds method ` into_buf ` for ` Box<Pointer> ` and ` impl From<PathBuf> for Box<Pointer> ` .
12
+ - Adds method ` into_buf ` for ` Box<Pointer> ` and ` impl From<PathBuf> for Box<Pointer> ` .
14
13
- Adds unsafe associated methods ` Pointer::new_unchecked ` and ` PointerBuf::new_unchecked ` for
15
14
external zero-cost construction.
16
15
- Adds ` Pointer::starts_with ` and ` Pointer::ends_with ` for prefix and suffix matching.
17
16
- Adds new ` ParseIndexError ` variant to express the presence non-digit characters in the token.
18
17
- Adds ` Token::is_next ` for checking if a token represents the ` - ` character.
18
+ - Adds ` InvalidEncoding ` to represent the two possible encoding errors when decoding a token.
19
+ - Adds ` diagnotic::Diagnostic ` trait to facilitate error reporting and
20
+ ` miette ` integration. All errors intended for usage with ` assign::Assign ` or
21
+ ` resolve::Resolve ` must implement this trait.
22
+ - Adds ` diagnostic::Report<T> ` to capture the input for ` PointerBuf::parse `
23
+ and to facilitate ` miette ` integration for all errors.
24
+ - Adds ` "miette" ` feature flag to enable ` miette ` integration for error reporting.
19
25
20
26
### Changed
21
27
22
- - Changed signature of ` PathBuf::parse ` to avoid requiring allocation.
23
- - Bumps minimum Rust version to 1.79.
24
28
- ` Pointer::get ` now accepts ranges and can produce ` Pointer ` segments as output (similar to
25
29
` slice::get ` ).
30
+ - Bumps minimum Rust version to 1.79.
31
+ - ` PointerBuf::parse ` now returns ` RichParseError ` , an alias to
32
+ ` Report<ParseError> ` which contains the allocated string as well as the
33
+ error. Use ` Report::original ` for matches or `Report::
34
+ - Renames ` ParseError::NoLeadingBackslash ` to ` ParseError::NoLeadingSlash `
35
+ (sorry for the churn, I spaced hard - @chanced ).
36
+ - Adds field ` position ` to variants of ` resolve::Error ` and ` assign::Error ` to indicate the
37
+ token index of where the error occurred.
38
+ - Renames ` ParseError::is_no_leading_backslash ` to ` ParseError::is_no_leading_slash ` .
39
+ - Renames ` assign::AssignError ` to ` assign::Error `
40
+ - Renames ` resolve::ResolveError ` to ` resolve::Error `
41
+ - Renames ` InvalidEncodingError ` to ` EncodingError `
26
42
27
43
### Fixed
28
44
29
45
- Make validation of array indices conform to RFC 6901 in the presence of non-digit characters.
30
46
47
+ ### Deprecated
48
+
49
+ - ` ParseError::is_no_leading_backslash ` renamed to ` ParseError::is_no_leading_slash ` .
50
+ - ` assign::AssignError ` renamed to ` assign::Error `
51
+ - ` resolve::ResolveError ` renamed to ` resolve::Error `
52
+ - ` InvalidEncodingError ` renamed to ` EncodingError `
53
+
31
54
## [ 0.6.2] 2024-09-30
32
55
33
56
### Added
0 commit comments