Make doctests pass

This commit is contained in:
George Bateman 2022-10-23 00:13:47 +01:00
parent caffa9b7ab
commit fc56c70500
No known key found for this signature in database
GPG Key ID: C417AA9C4039EFCF

View File

@ -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 }
}
}