diff --git a/full-moon/Cargo.toml b/full-moon/Cargo.toml index 7f6f5482..bbb07fd8 100644 --- a/full-moon/Cargo.toml +++ b/full-moon/Cargo.toml @@ -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" diff --git a/full-moon/src/short_string.rs b/full-moon/src/short_string.rs index 1638b26e..d297a00c 100644 --- a/full-moon/src/short_string.rs +++ b/full-moon/src/short_string.rs @@ -14,7 +14,7 @@ pub struct ShortString(SmolStr); impl ShortString { /// Creates a new ShortString from the given text. pub fn new + AsRef>(text: T) -> Self { - ShortString(SmolStr::from(text)) + ShortString(SmolStr::new(text)) } /// Returns a `&str` representation of the ShortString. @@ -49,7 +49,7 @@ impl Deref for ShortString { impl + AsRef> From for ShortString { fn from(value: T) -> Self { - ShortString(SmolStr::from(value)) + ShortString(SmolStr::new(value)) } } diff --git a/full-moon/tests/fail_cases.rs b/full-moon/tests/fail_cases.rs index 610b9d46..b5432db7 100644 --- a/full-moon/tests/fail_cases.rs +++ b/full-moon/tests/fail_cases.rs @@ -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; @@ -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() );