Skip to content

Commit 960c343

Browse files
committed
fix(storage): use as_chunks so clippy 1.98 is happy
Signed-off-by: crimsonsunset <jsangio1@gmail.com>
1 parent 138e3fa commit 960c343

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

crates/mcpmux-storage/src/repositories/embedding_repository.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ fn decode_vector(blob: &[u8]) -> Result<Vec<f32>> {
4848
}
4949

5050
Ok(blob
51-
.chunks_exact(std::mem::size_of::<f32>())
52-
.map(|chunk| f32::from_le_bytes([chunk[0], chunk[1], chunk[2], chunk[3]]))
51+
.as_chunks::<{ std::mem::size_of::<f32>() }>()
52+
.0
53+
.iter()
54+
.map(|chunk| f32::from_le_bytes(*chunk))
5355
.collect())
5456
}
5557

0 commit comments

Comments
 (0)