Skip to content

Commit

Permalink
Add type annotations to fix new clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
PlasmaPower committed Aug 1, 2024
1 parent 99173a9 commit b282094
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arbitrator/brotli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pub fn compress_fixed<'a>(
BrotliEncoderDestroyInstance(state);

// SAFETY: brotli initialized this span of bytes
let output = mem::transmute(&output[..out_len]);
let output = mem::transmute::<&[MaybeUninit<u8>], &[u8]>(&output[..out_len]);
Ok(output)
}
}
Expand Down Expand Up @@ -304,7 +304,7 @@ pub fn decompress_fixed<'a>(
BrotliDecoderDestroyInstance(state);

// SAFETY: brotli initialized this span of bytes
let output = mem::transmute(&output[..out_len]);
let output = mem::transmute::<&[MaybeUninit<u8>], &[u8]>(&output[..out_len]);
Ok(output)
}
}

0 comments on commit b282094

Please sign in to comment.