Skip to content

Commit

Permalink
Update packages (#318)
Browse files Browse the repository at this point in the history
Updates:
- smol_str (to 0.3.1, b548071 &
e2a5693)
- termcolor (to 1.4.1, 0712f6e)
- pretty_assertions (to 1.4.1, eaafa78)
- insta (to 1.40.0, f0b4f8d &
99e963f)
  • Loading branch information
DataM0del authored Oct 9, 2024
1 parent 81a9fc3 commit b5020b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions full-moon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ derive_more = { version = "1.0", features = ["display"] }
full_moon_derive = { path = "../full-moon-derive", version = "=0.11.0" }
paste = "1.0"
serde = { version = "1.0", features = ["derive", "rc"], optional = true }
smol_str = { version = "0.1.23", features = ["serde"] }
smol_str = { version = "0.3.1", features = ["serde"] }

[dev-dependencies]
codespan = "0.11.1"
codespan-reporting = "0.11.1"
criterion = "0.5.1"
insta = { version = "1.26.0", features = ["glob", "yaml"] }
pretty_assertions = "1.3.0"
termcolor = "1.2.0"
insta = { version = "1.40.0", features = ["glob", "yaml"] }
pretty_assertions = "1.4.1"
termcolor = "1.4.1"

[[bench]]
name = "date"
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,7 +49,7 @@ 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))
}
}

Expand Down
4 changes: 2 additions & 2 deletions full-moon/tests/fail_cases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use full_moon::{
ast::{AstResult, LuaVersion},
tokenizer::{self, LexerResult},
};
use insta::{assert_display_snapshot, assert_yaml_snapshot};
use insta::{assert_snapshot, assert_yaml_snapshot};
use std::{fs, path::Path};

mod common;
Expand Down Expand Up @@ -53,7 +53,7 @@ fn process_codespan_display(source: &str, result: &AstResult) {
codespan_reporting::term::emit(&mut output, &config, &files, &diagnostic).unwrap();
}

assert_display_snapshot!(
assert_snapshot!(
"error_display",
String::from_utf8(output.into_inner()).unwrap()
);
Expand Down

0 comments on commit b5020b5

Please sign in to comment.