Skip to content

Commit 6835707

Browse files
committed
---
yaml --- r: 38579 b: refs/heads/incoming c: 140d16a h: refs/heads/master i: 38577: a2420d3 38575: 133c083 v: v3
1 parent a2b9484 commit 6835707

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
@@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9-
refs/heads/incoming: 5bca5f7c5474083aeddca1d5c405ff08ec8322f4
9+
refs/heads/incoming: 140d16ac5803a0e7b61d0f901a82549c09e4411f
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/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)