diff options
| author | mat <git@matdoes.dev> | 2025-12-11 23:21:42 -1030 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-11 23:21:42 -1030 |
| commit | ca70e5e321a3c174c53d0650feed84db471ac30d (patch) | |
| tree | 43042fa40c2f3d7f30ea56e1ee84c59dcb13be66 /azalea-brigadier/src/string_reader.rs | |
| parent | 918214e8ba4eae65daf5d2da17aa0022f2ae5212 (diff) | |
| download | azalea-drasl-ca70e5e321a3c174c53d0650feed84db471ac30d.tar.xz | |
enable str_to_string clippy lint
Diffstat (limited to 'azalea-brigadier/src/string_reader.rs')
| -rw-r--r-- | azalea-brigadier/src/string_reader.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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<String> 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<bool, CommandSyntaxError> { |
