Skip to content

Commit

Permalink
Merge branch 'feature/add-repr-transparent' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lo48576 committed Sep 19, 2024
2 parents 951b7af + 46f99bb commit 688d345
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## [Unreleased]

* Fix unsoundness of `template::UriTemplateStr`

### Fixed
* Fix unsoundness of `template::UriTemplateStr`
* The type should have `#[repr(transparent)]` to compile safely but did not.
* Any creations and uses of the value are undefined behavior without the
fix, while the current version of the Rust compiler seems to happen to
generate the expected binary (without any guarantee).

## [0.7.4]

* Fix calculation of template expansion error location.
Expand Down
1 change: 1 addition & 0 deletions src/template/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ mod owned;
/// ```
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
#[cfg_attr(feature = "serde", serde(transparent))]
#[repr(transparent)]
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct UriTemplateStr {
/// The raw string.
Expand Down

0 comments on commit 688d345

Please sign in to comment.