implement `AsMut<[u8]>` and `AsMut<[u8;4]>` for `Magic`
This commit is contained in:
parent
6e5e8d80a6
commit
bfb4977be9
|
@ -265,6 +265,18 @@ impl AsRef<[u8; 4]> for Magic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl AsMut<[u8]> for Magic {
|
||||||
|
fn as_mut(&mut self) -> &mut [u8] {
|
||||||
|
&mut self.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AsMut<[u8; 4]> for Magic {
|
||||||
|
fn as_mut(&mut self) -> &mut [u8; 4] {
|
||||||
|
&mut self.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Borrow<[u8]> for Magic {
|
impl Borrow<[u8]> for Magic {
|
||||||
fn borrow(&self) -> &[u8] {
|
fn borrow(&self) -> &[u8] {
|
||||||
&self.0
|
&self.0
|
||||||
|
|
Loading…
Reference in New Issue