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

update smol_str to 0.2.0 #289

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion full-moon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ full_moon_derive = { path = "../full-moon-derive", version = "=0.11.0" }
logos = "0.12.1"
paste = "1.0"
serde = { version = "1.0", features = ["derive", "rc"], optional = true }
smol_str = { version = "0.1.23", features = ["serde"] }
smol_str = { version = "0.2.0", features = ["serde"] }
stacker = { version = "0.1.15", optional = true }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions full-moon/src/short_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub struct ShortString(SmolStr);
impl ShortString {
/// Creates a new ShortString from the given text.
pub fn new<T: Into<String> + AsRef<str>>(text: T) -> Self {
ShortString(SmolStr::from(text))
ShortString(SmolStr::new(text))
}

/// Returns a `&str` representation of the ShortString.
Expand Down Expand Up @@ -49,6 +49,6 @@ impl Deref for ShortString {

impl<T: Into<String> + AsRef<str>> From<T> for ShortString {
fn from(value: T) -> Self {
ShortString(SmolStr::from(value))
ShortString(SmolStr::new(value))
}
}