51: Fix a bit of broken markdown in the interop chapter r=jamesmunns a=jamesmunns



Co-authored-by: James Munns <james.munns@ferrous-systems.com>
This commit is contained in:
bors[bot]
2018-10-16 18:21:13 +00:00

View File

@@ -19,14 +19,13 @@ to C-types that are easier and safer to handle.
For `#![no_std]` environments, there is also `core::raw` that
covers all the primitive types.
------------------------------------------
| Rust type | Intermediate | C type |
|-----------|--------------|--------------|
| String | CString | *char |
| &str | CStr | *const char |
| () | c_void | void |
| u32 | u64 | c_uint | unsigned int |
| etc | ... | ... |
| Rust type | Intermediate | C type |
|------------|--------------|--------------|
| String | CString | *char |
| &str | CStr | *const char |
| () | c_void | void |
| u32 or u64 | c_uint | unsigned int |
| etc | ... | ... |
As mentioned above, primitive types can be converted
by the compiler implicitly.
@@ -36,4 +35,4 @@ unsafe fn foo(num: u32) {
let c_num: c_uint = num;
let r_num: u32 = c_num;
}
```
```