Skip to content

Commit b8855ef

Browse files
committed
clippy
1 parent 291085f commit b8855ef

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

turbopack/crates/turbo-tasks-backend/src/database/turbo.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl KeyBase for WriteBuffer<'_> {
160160

161161
impl StoreKey for WriteBuffer<'_> {
162162
fn write_to(&self, buf: &mut Vec<u8>) {
163-
buf.extend_from_slice(&**self);
163+
buf.extend_from_slice(self);
164164
}
165165
}
166166

@@ -184,9 +184,9 @@ impl PartialOrd for WriteBuffer<'_> {
184184
}
185185
}
186186

187-
impl<'l> Into<ValueBuffer<'l>> for WriteBuffer<'l> {
188-
fn into(self) -> ValueBuffer<'l> {
189-
match self {
187+
impl<'l> From<WriteBuffer<'l>> for ValueBuffer<'l> {
188+
fn from(val: WriteBuffer<'l>) -> Self {
189+
match val {
190190
WriteBuffer::Borrowed(b) => ValueBuffer::Borrowed(b),
191191
WriteBuffer::Vec(v) => ValueBuffer::Vec(v),
192192
WriteBuffer::SmallVec(sv) => ValueBuffer::SmallVec(sv),

turbopack/crates/turbo-tasks-backend/src/kv_backing_storage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const POT_CONFIG: pot::Config = pot::Config::new().compatibility(pot::Compatibil
2626

2727
fn pot_serialize_small_vec<T: Serialize>(value: &T) -> pot::Result<SmallVec<[u8; 16]>> {
2828
struct SmallVecWrite<'l>(&'l mut SmallVec<[u8; 16]>);
29-
impl<'l> std::io::Write for SmallVecWrite<'l> {
29+
impl std::io::Write for SmallVecWrite<'_> {
3030
#[inline]
3131
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
3232
self.0.extend_from_slice(buf);
@@ -349,7 +349,7 @@ impl<T: KeyValueDatabase + Send + Sync + 'static> BackingStorage
349349
.put(
350350
key_space,
351351
WriteBuffer::Borrowed(IntKey::new(*task_id).as_ref()),
352-
value.into(),
352+
value,
353353
)
354354
.with_context(|| anyhow!("Unable to write data items for {task_id}"))?;
355355
}

0 commit comments

Comments
 (0)