0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-11-21 15:04:33 -05:00
This commit is contained in:
Bert Belder 2019-10-08 02:40:03 +02:00
parent 5931696251
commit 12a439e55d
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461

View file

@ -23,7 +23,6 @@ mod channel {
_cxx_vtable: *const [usize; 0],
}
#[allow(dead_code)]
impl Channel {
pub fn method1(&mut self) {
unsafe { Channel__method1(self) }
@ -225,24 +224,16 @@ mod util {
pub unsafe fn to_outer<'a>(&self, inner: &'a I) -> &'a O {
Self::shift::<I, O>(inner, -self.0).as_ref().unwrap()
}
#[allow(dead_code)]
pub unsafe fn to_outer_mut<'a>(&self, inner: &'a mut I) -> &'a mut O {
Self::shift::<I, O>(inner, -self.0).as_mut().unwrap()
}
}
impl<O, M, I> std::ops::Add<FieldOffset<M, I>> for FieldOffset<O, M> {
type Output = FieldOffset<O, I>;
fn add(self, that: FieldOffset<M, I>) -> Self::Output {
FieldOffset::<O, I>::from_offset(self.offset() + that.offset())
}
}
}
mod example {
use super::channel::*;
#[allow(dead_code)]
pub struct Example {
a: i32,
channel_extender: ChannelExtender,