Skip to content

Commit

Permalink
fix: serde-unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWhiteWu committed Dec 24, 2023
1 parent fbd4d31 commit e26bd65
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
20 changes: 5 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "faststr"
version = "0.2.13"
version = "0.2.14"
authors = ["Volo Team <volo@cloudwego.io>"]
edition = "2021"
description = "Faststr is a string library that reduces the cost of clone."
Expand Down
4 changes: 0 additions & 4 deletions src/serde.rs
Expand Up @@ -75,10 +75,6 @@ where
where
E: Error,
{
#[cfg(feature = "serde-unsafe")]
{
Ok(unsafe { FastStr::from_vec_u8_unchecked(v) })
}
#[cfg(not(feature = "serde-unsafe"))]
simdutf8::basic::from_utf8(&v)
.map_err(|_| Error::invalid_value(Unexpected::Bytes(&v), &self))?;
Expand Down

0 comments on commit e26bd65

Please sign in to comment.