From ca70e5e321a3c174c53d0650feed84db471ac30d Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 11 Dec 2025 23:21:42 -1030 Subject: enable str_to_string clippy lint --- azalea-brigadier/src/string_reader.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'azalea-brigadier/src/string_reader.rs') diff --git a/azalea-brigadier/src/string_reader.rs b/azalea-brigadier/src/string_reader.rs index 8dd41ed3..e3ab99ff 100644 --- a/azalea-brigadier/src/string_reader.rs +++ b/azalea-brigadier/src/string_reader.rs @@ -20,7 +20,7 @@ impl From for StringReader { impl From<&str> for StringReader { fn from(string: &str) -> Self { Self { - string: string.to_string(), + string: string.to_owned(), cursor: 0, } } @@ -104,7 +104,7 @@ impl StringReader { if result.is_err() { self.cursor = start; return Err(BuiltInError::ReaderInvalidInt { - value: number.to_string(), + value: number.to_owned(), } .create_with_context(self)); } @@ -125,7 +125,7 @@ impl StringReader { if result.is_err() { self.cursor = start; return Err(BuiltInError::ReaderInvalidLong { - value: number.to_string(), + value: number.to_owned(), } .create_with_context(self)); } @@ -146,7 +146,7 @@ impl StringReader { if result.is_err() { self.cursor = start; return Err(BuiltInError::ReaderInvalidDouble { - value: number.to_string(), + value: number.to_owned(), } .create_with_context(self)); } @@ -167,7 +167,7 @@ impl StringReader { if result.is_err() { self.cursor = start; return Err(BuiltInError::ReaderInvalidFloat { - value: number.to_string(), + value: number.to_owned(), } .create_with_context(self)); } @@ -240,7 +240,7 @@ impl StringReader { self.skip(); return self.read_string_until(next); } - Ok(self.read_unquoted_string().to_string()) + Ok(self.read_unquoted_string().to_owned()) } pub fn read_boolean(&mut self) -> Result { -- cgit v1.2.3