diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-07-01 15:28:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-01 15:28:06 +0200 |
commit | b8b82c3ea4ec154581f57b0d00f08f2fd1d871ce (patch) | |
tree | d94e3230479fe44dfe347d452423f98a5a1d8a47 /serde_v8/magic/v8slice.rs | |
parent | 77c25beaa59d64035c20ef59d93ed5a99677bc93 (diff) |
chore: use Rust 1.62.0 (#15028)
Diffstat (limited to 'serde_v8/magic/v8slice.rs')
-rw-r--r-- | serde_v8/magic/v8slice.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/serde_v8/magic/v8slice.rs b/serde_v8/magic/v8slice.rs index 452c857a3..67255fc53 100644 --- a/serde_v8/magic/v8slice.rs +++ b/serde_v8/magic/v8slice.rs @@ -50,6 +50,7 @@ impl V8Slice { } fn as_slice_mut(&mut self) -> &mut [u8] { + #[allow(clippy::cast_ref_to_mut)] // SAFETY: v8::SharedRef<v8::BackingStore> is similar to Arc<[u8]>, // it points to a fixed continuous slice of bytes on the heap. // It's safe-ish to mutate concurrently because it can not be @@ -59,7 +60,6 @@ impl V8Slice { // concurrent mutation is simply an accepted fact of life. // And in practice V8Slices also do not have overallping read/write phases. // TLDR: permissive interior mutability on slices of bytes is "fine" - #[allow(clippy::cast_ref_to_mut)] unsafe { &mut *(&self.store[self.range.clone()] as *const _ as *mut [u8]) } |