Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 0.2.2 changelog & fix lints #87

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@

## 0.3.0 - 2024-09-04

- Removed deprecated `SmolStr::new_inline_from_ascii` function
- Removed `SmolStr::to_string` in favor of `ToString::to_string`
- Added `impl AsRef<[u8]> for SmolStr` impl
- Added `impl AsRef<OsStr> for SmolStr` impl
- Added `impl AsRef<Path> for SmolStr` impl
- Added `SmolStrBuilder`
- Remove deprecated `SmolStr::new_inline_from_ascii` function
- Remove `SmolStr::to_string` in favor of `ToString::to_string`
- Add `impl AsRef<[u8]> for SmolStr` impl
- Add `impl AsRef<OsStr> for SmolStr` impl
- Add `impl AsRef<Path> for SmolStr` impl
- Add `SmolStrBuilder`

## 0.2.2 - 2024-05-14

- Add `StrExt` trait providing `to_lowercase_smolstr`, `replace_smolstr` and similar
- Add `PartialEq` optimization for `ptr_eq`-able representations
2 changes: 1 addition & 1 deletion src/borsh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl BorshDeserialize for SmolStr {
Error::new(ErrorKind::InvalidData, msg)
})?;
Ok(SmolStr(Repr::Inline {
len: unsafe { transmute(len as u8) },
len: unsafe { transmute::<u8, crate::InlineSize>(len as u8) },
buf,
}))
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use core::{
/// * Strings are stack-allocated if they are:
/// * Up to 23 bytes long
/// * Longer than 23 bytes, but substrings of `WS` (see below). Such strings consist
/// solely of consecutive newlines, followed by consecutive spaces
/// solely of consecutive newlines, followed by consecutive spaces
/// * If a string does not satisfy the aforementioned conditions, it is heap-allocated
/// * Additionally, a `SmolStr` can be explicitly created from a `&'static str` without allocation
///
Expand Down
Loading