Skip to content

Commit f680abc

Browse files
authored
Merge pull request #87 from alexheretic/changelog++
Add 0.2.2 changelog & fix lints
2 parents 4a25cbe + 811ac43 commit f680abc

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

CHANGELOG.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@
66

77
## 0.3.0 - 2024-09-04
88

9-
- Removed deprecated `SmolStr::new_inline_from_ascii` function
10-
- Removed `SmolStr::to_string` in favor of `ToString::to_string`
11-
- Added `impl AsRef<[u8]> for SmolStr` impl
12-
- Added `impl AsRef<OsStr> for SmolStr` impl
13-
- Added `impl AsRef<Path> for SmolStr` impl
14-
- Added `SmolStrBuilder`
9+
- Remove deprecated `SmolStr::new_inline_from_ascii` function
10+
- Remove `SmolStr::to_string` in favor of `ToString::to_string`
11+
- Add `impl AsRef<[u8]> for SmolStr` impl
12+
- Add `impl AsRef<OsStr> for SmolStr` impl
13+
- Add `impl AsRef<Path> for SmolStr` impl
14+
- Add `SmolStrBuilder`
15+
16+
## 0.2.2 - 2024-05-14
17+
18+
- Add `StrExt` trait providing `to_lowercase_smolstr`, `replace_smolstr` and similar
19+
- Add `PartialEq` optimization for `ptr_eq`-able representations

src/borsh.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl BorshDeserialize for SmolStr {
2222
Error::new(ErrorKind::InvalidData, msg)
2323
})?;
2424
Ok(SmolStr(Repr::Inline {
25-
len: unsafe { transmute(len as u8) },
25+
len: unsafe { transmute::<u8, crate::InlineSize>(len as u8) },
2626
buf,
2727
}))
2828
} else {

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use core::{
1919
/// * Strings are stack-allocated if they are:
2020
/// * Up to 23 bytes long
2121
/// * Longer than 23 bytes, but substrings of `WS` (see below). Such strings consist
22-
/// solely of consecutive newlines, followed by consecutive spaces
22+
/// solely of consecutive newlines, followed by consecutive spaces
2323
/// * If a string does not satisfy the aforementioned conditions, it is heap-allocated
2424
/// * Additionally, a `SmolStr` can be explicitly created from a `&'static str` without allocation
2525
///

0 commit comments

Comments
 (0)