Skip to content

Commit d1c6b95

Browse files
Merge branch 'master' into revert-trivial-wording
2 parents 3c17036 + 60f0b30 commit d1c6b95

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[book]
2-
author = "The Rust Project Developers"
2+
authors = ["The Rust Project Developers"]
33
title = "The Rustonomicon"
44
description = "The Dark Arts of Advanced and Unsafe Rust Programming"
55

src/exception-safety.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ code and the unsafe code into two separate phases:
104104
```text
105105
bubble_up(heap, index):
106106
let end_index = index;
107-
while end_index != 0 && heap[end_index] < heap[parent(end_index)]:
107+
while end_index != 0 && heap[index] < heap[parent(end_index)]:
108108
end_index = parent(end_index)
109109
110110
let elem = heap[index]

src/ffi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ libc = "0.2.0"
2525

2626
Because [snappy](https://github.com/google/snappy) is a static library by default.
2727
So there is no C++ std linked in the output artifact.
28-
n order to use this foreign library in Rust, we have to manually specify that we want to link stdc++ in our project.
28+
In order to use this foreign library in Rust, we have to manually specify that we want to link stdc++ in our project.
2929
The easiest way to do this is by setting up a build script.
3030

3131
First edit `Cargo.toml`, inside `package` add `build = "build.rs"`:
@@ -90,7 +90,7 @@ The `extern` block can be extended to cover the entire snappy API:
9090
use libc::{c_int, size_t};
9191
9292
#[link(name = "snappy")]
93-
unsafe extern {
93+
unsafe extern "C" {
9494
fn snappy_compress(input: *const u8,
9595
input_length: size_t,
9696
compressed: *mut u8,

0 commit comments

Comments
 (0)