Skip to content

Commit 507ee35

Browse files
committed
---
yaml --- r: 37195 b: refs/heads/try c: 140d16a h: refs/heads/master i: 37193: 8cab2f7 37191: 948c00c v: v3
1 parent fd3f282 commit 507ee35

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: 5bca5f7c5474083aeddca1d5c405ff08ec8322f4
5+
refs/heads/try: 140d16ac5803a0e7b61d0f901a82549c09e4411f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/doc/tutorial-ffi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn sha1(data: ~str) -> ~str unsafe {
3030
let bytes = str::to_bytes(data);
3131
let hash = crypto::SHA1(vec::raw::to_ptr(bytes),
3232
vec::len(bytes) as c_uint, ptr::null());
33-
return as_hex(vec::raw::from_buf(hash, 20));
33+
return as_hex(vec::from_buf(hash, 20));
3434
}
3535
3636
fn main(args: ~[~str]) {
@@ -132,7 +132,7 @@ fn sha1(data: ~str) -> ~str {
132132
let bytes = str::to_bytes(data);
133133
let hash = crypto::SHA1(vec::raw::to_ptr(bytes),
134134
vec::len(bytes), ptr::null());
135-
return as_hex(vec::raw::from_buf(hash, 20));
135+
return as_hex(vec::from_buf(hash, 20));
136136
}
137137
}
138138
~~~~
@@ -177,7 +177,7 @@ Let's look at our `sha1` function again.
177177
let bytes = str::to_bytes(data);
178178
let hash = crypto::SHA1(vec::raw::to_ptr(bytes),
179179
vec::len(bytes), ptr::null());
180-
return as_hex(vec::raw::from_buf(hash, 20));
180+
return as_hex(vec::from_buf(hash, 20));
181181
# }
182182
# }
183183
~~~~
@@ -198,7 +198,7 @@ unsafe null pointer of type `*u8`. (Rust generics are awesome
198198
like that: they can take the right form depending on the type that they
199199
are expected to return.)
200200

201-
Finally, `vec::raw::from_buf` builds up a new `~[u8]` from the
201+
Finally, `vec::from_buf` builds up a new `~[u8]` from the
202202
unsafe pointer that `SHA1` returned. SHA1 digests are always
203203
twenty bytes long, so we can pass `20` for the length of the new
204204
vector.

0 commit comments

Comments
 (0)