Skip to content

Commit 05f9437

Browse files
committed
---
yaml --- r: 55711 b: refs/heads/master c: 4357cbf h: refs/heads/master i: 55709: 195c73b 55707: 1b6d2d3 55703: 58361a0 55695: 96b1c14 55679: 8ce5392 v: v3
1 parent 68e3f04 commit 05f9437

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 276293af7c0fb901c8344e88562ce635f26f47a9
2+
refs/heads/master: 4357cbf2fac1e5a0d9723c1f0f9e94c831dc397c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a

trunk/src/libcore/str.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,20 +2319,20 @@ pub mod raw {
23192319
}
23202320

23212321
/// Removes the last byte from a string and returns it. (Not UTF-8 safe).
2322-
pub fn pop_byte(s: &mut ~str) -> u8 {
2322+
pub unsafe fn pop_byte(s: &mut ~str) -> u8 {
23232323
let len = len(*s);
23242324
assert!((len > 0u));
23252325
let b = s[len - 1u];
2326-
unsafe { set_len(s, len - 1u) };
2326+
set_len(s, len - 1u);
23272327
return b;
23282328
}
23292329

23302330
/// Removes the first byte from a string and returns it. (Not UTF-8 safe).
2331-
pub fn shift_byte(s: &mut ~str) -> u8 {
2331+
pub unsafe fn shift_byte(s: &mut ~str) -> u8 {
23322332
let len = len(*s);
23332333
assert!((len > 0u));
23342334
let b = s[0];
2335-
*s = unsafe { raw::slice_bytes_owned(*s, 1u, len) };
2335+
*s = raw::slice_bytes_owned(*s, 1u, len);
23362336
return b;
23372337
}
23382338

0 commit comments

Comments
 (0)