Allow SkBuffContext .store() without a mutable reference

- there's no mutable reference to SkBuffContext
- there's interior mutability since skb is stored as a mutable reference
pull/364/head
Joshua Koo 3 years ago
parent 632ea300ed
commit 1f5dc64940

@ -142,7 +142,7 @@ impl SkBuffContext {
}
#[inline]
pub fn store<T>(&mut self, offset: usize, v: &T, flags: u64) -> Result<(), c_long> {
pub fn store<T>(&self, offset: usize, v: &T, flags: u64) -> Result<(), c_long> {
unsafe {
let ret = bpf_skb_store_bytes(
self.skb as *mut _,

Loading…
Cancel
Save