Make more methods inline
MODIFY
binding-generator/src/writer/rust_native/tpl/class/base.tpl.rs
binding-generator/src/writer/rust_native/tpl/class/base.tpl.rs
impl {{base_rust_full}} for {{rust_local}} {
- fn as_raw_{{base_rust_local}}(&self) -> {{base_rust_extern_const}} { self.as_raw() }
- fn as_raw_mut_{{base_rust_local}}(&mut self) -> {{base_rust_extern_mut}} { self.as_raw_mut() }
+ #[inline] fn as_raw_{{base_rust_local}}(&self) -> {{base_rust_extern_const}} { self.as_raw() }
+ #[inline] fn as_raw_mut_{{base_rust_local}}(&mut self) -> {{base_rust_extern_mut}} { self.as_raw_mut() }
}

MODIFY
binding-generator/src/writer/rust_native/tpl/class/boxed.tpl.rs
binding-generator/src/writer/rust_native/tpl/class/boxed.tpl.rs
@@ -14,8 +14,8 @@ impl Drop for {{rust_local}} {
}
impl {{rust_local}} {
- pub fn as_raw_{{rust_local}}(&self) -> {{rust_extern_const}} { self.as_raw() }
- pub fn as_raw_mut_{{rust_local}}(&mut self) -> {{rust_extern_mut}} { self.as_raw_mut() }
+ #[inline] pub fn as_raw_{{rust_local}}(&self) -> {{rust_extern_const}} { self.as_raw() }
+ #[inline] pub fn as_raw_mut_{{rust_local}}(&mut self) -> {{rust_extern_mut}} { self.as_raw_mut() }
}
unsafe impl Send for {{rust_local}} {}

MODIFY
binding-generator/src/writer/rust_native/tpl/smart_ptr/rust.tpl.rs
binding-generator/src/writer/rust_native/tpl/smart_ptr/rust.tpl.rs
@@ -5,8 +5,8 @@ ptr_extern! { {{inner_rust_full}},
}
impl {{rust_localalias}} {
- pub fn as_raw_{{rust_localalias}}(&self) -> {{rust_extern_const}} { self.as_raw() }
- pub fn as_raw_mut_{{rust_localalias}}(&mut self) -> {{rust_extern_mut}} { self.as_raw_mut() }
+ #[inline] pub fn as_raw_{{rust_localalias}}(&self) -> {{rust_extern_const}} { self.as_raw() }
+ #[inline] pub fn as_raw_mut_{{rust_localalias}}(&mut self) -> {{rust_extern_mut}} { self.as_raw_mut() }
}
{{impls}}

MODIFY
binding-generator/src/writer/rust_native/tpl/smart_ptr/trait_cast.tpl.rs
binding-generator/src/writer/rust_native/tpl/smart_ptr/trait_cast.tpl.rs
impl {{base_rust_full}} for {{rust_localalias}} {
- fn as_raw_{{base_rust_local}}(&self) -> {{rust_extern_const}} { self.inner_as_raw() }
- fn as_raw_mut_{{base_rust_local}}(&mut self) -> {{rust_extern_mut}} { self.inner_as_raw_mut() }
+ #[inline] fn as_raw_{{base_rust_local}}(&self) -> {{rust_extern_const}} { self.inner_as_raw() }
+ #[inline] fn as_raw_mut_{{base_rust_local}}(&mut self) -> {{rust_extern_mut}} { self.inner_as_raw_mut() }
}

Make more methods inline