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-buf/src/read.rs | |
| parent | 918214e8ba4eae65daf5d2da17aa0022f2ae5212 (diff) | |
| download | azalea-drasl-ca70e5e321a3c174c53d0650feed84db471ac30d.tar.xz | |
enable str_to_string clippy lint
Diffstat (limited to 'azalea-buf/src/read.rs')
| -rw-r--r-- | azalea-buf/src/read.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-buf/src/read.rs b/azalea-buf/src/read.rs index 95dc79ac..a906c8c1 100644 --- a/azalea-buf/src/read.rs +++ b/azalea-buf/src/read.rs @@ -103,7 +103,7 @@ fn read_utf_with_len(buf: &mut Cursor<&[u8]>, max_length: u32) -> Result<String, lossy: String::from_utf8_lossy(buffer).to_string(), // backtrace: Backtrace::capture(), })? - .to_string(); + .to_owned(); if string.len() > length as usize { return Err(BufReadError::StringLengthTooLong { length, max_length }); } @@ -422,7 +422,7 @@ impl AzaleaRead for simdnbt::owned::NbtCompound { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { match simdnbt::owned::read_tag(buf).map_err(simdnbt::Error::from)? { simdnbt::owned::NbtTag::Compound(compound) => Ok(compound), - _ => Err(BufReadError::Custom("Expected compound tag".to_string())), + _ => Err(BufReadError::Custom("Expected compound tag".to_owned())), } } } |
