From 2e3f8aa16da72598ed9450dbb94d82bae5308f61 Mon Sep 17 00:00:00 2001 From: James Munns Date: Tue, 16 Oct 2018 17:47:09 +0200 Subject: [PATCH] Fix a bit of broken markdown in the interop chapter --- src/interoperability/interoperability.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/interoperability/interoperability.md b/src/interoperability/interoperability.md index cd98fd8..4b6ca65 100644 --- a/src/interoperability/interoperability.md +++ b/src/interoperability/interoperability.md @@ -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; } -``` \ No newline at end of file +```