Skip to content

Commit f6727ec

Browse files
committed
---
yaml --- r: 4345 b: refs/heads/master c: a1a2596 h: refs/heads/master i: 4343: c95c906 v: v3
1 parent b940e90 commit f6727ec

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 77be30fa737c6b55faf3a52fbd2050f5b35ebb02
2+
refs/heads/master: a1a25969a072a33f68fba16a2a3859a7d96809c2

trunk/src/lib/ioivec.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,18 @@ fn seek_in_buf(offset: int, pos: uint, len: uint, whence: seek_style) ->
454454
if bpos < 0 { bpos = 0; } else if (bpos > blen) { bpos = blen; }
455455
ret bpos as uint;
456456
}
457+
458+
fn read_whole_file_str(file: &str) -> str {
459+
str::unsafe_from_bytes_ivec(read_whole_file(file))
460+
}
461+
462+
fn read_whole_file(file: &str) -> u8[] {
463+
// FIXME: There's a lot of copying here
464+
file_reader(file).read_whole_stream()
465+
}
466+
467+
468+
457469
//
458470
// Local Variables:
459471
// mode: rust

0 commit comments

Comments
 (0)