Skip to content

Commit 3100bb4

Browse files
committed
doc: Fix table format in cheatsheet
1 parent a61d7d6 commit 3100bb4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/complement-cheatsheet.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ let _ = close(Door::<Closed>(~"front")); // error: mismatched types: expected `m
165165

166166
## C function signature conversions
167167

168-
Description | C signature | Equivalent Rust signature
169-
----------------------|----------------------------------------------|------------------------------------------
170-
no parameters | `void foo(void);` | `fn foo();`
171-
return value | `int foo(void);` | `fn foo() -> c_int;`
172-
function parameters | `void foo(int x, int y);` | `fn foo(x: int, y: int);`
173-
in-out pointers | `void foo(const int* in_ptr, int* out_ptr);` | `fn foo(in_ptr: *c_int, out_ptr: *mut c_int);`
168+
Description C signature Equivalent Rust signature
169+
---------------------- ---------------------------------------------- ------------------------------------------
170+
no parameters `void foo(void);` `fn foo();`
171+
return value `int foo(void);` `fn foo() -> c_int;`
172+
function parameters `void foo(int x, int y);` `fn foo(x: int, y: int);`
173+
in-out pointers `void foo(const int* in_ptr, int* out_ptr);` `fn foo(in_ptr: *c_int, out_ptr: *mut c_int);`
174174

175175
Note: The Rust signatures should be wrapped in an `extern "ABI" { ... }` block.
176176

0 commit comments

Comments
 (0)