We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfa71a1 commit 007e47dCopy full SHA for 007e47d
src/libstd/ebml.rs
@@ -285,13 +285,7 @@ impl writer {
285
}
286
287
fn wr_tagged_str(tag_id: uint, v: ~str) {
288
- // Lame: can't use str::as_bytes() here because the resulting
289
- // vector is NULL-terminated. Annoyingly, the underlying
290
- // writer interface doesn't permit us to write a slice of a
291
- // vector. We need first-class slices, I think.
292
-
293
- // str::as_bytes(v) {|b| self.wr_tagged_bytes(tag_id, b); }
294
- self.wr_tagged_bytes(tag_id, str::bytes(v));
+ str::byte_slice(v, |b| self.wr_tagged_bytes(tag_id, b));
295
296
297
fn wr_bytes(b: &[u8]) {
0 commit comments