mirror of
https://gitee.com/openharmony/third_party_rust_bindgen
synced 2024-12-11 17:14:31 +00:00
Make doctests pass
This commit is contained in:
parent
caffa9b7ab
commit
fc56c70500
@ -23,8 +23,14 @@ struct MostFieldsPrivate {
|
||||
Then in Rust:
|
||||
|
||||
```rust
|
||||
# #[repr(C)]
|
||||
# pub struct OneFieldPrivate {
|
||||
# s: *const ::std::os::raw::c_char,
|
||||
# pub b: bool,
|
||||
# }
|
||||
|
||||
impl OneFieldPrivate {
|
||||
pub fn new(s: &'static core::ffi::CStr, b: bool) -> Self {
|
||||
pub fn new(s: &'static std::ffi::CStr, b: bool) -> Self {
|
||||
OneFieldPrivate { s: s.as_ptr(), b }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user