Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Commit 13cf077

Browse files
committed
Update tests for latest Rust.
1 parent 0de4477 commit 13cf077

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use extra::url::Url;
66
use std::cast;
77
use std::libc;
8-
use std::cell::Cell;
98
use util::{DataStream, VoidPtrLike};
109
use values::*;
1110
use types::*;
@@ -28,15 +27,17 @@ struct StyleStream {
2827
impl DataStream for StyleStream {
2928
fn read(&mut self) -> Option<~[u8]> {
3029
if !self.style.is_empty() {
31-
Some(self.style.as_bytes().to_owned())
30+
let data = self.style.as_bytes().to_owned();
31+
self.style = ~"";
32+
Some(data)
3233
} else {
3334
None
3435
}
3536
}
3637
}
3738

3839
fn style_stream(style: &str) -> @mut DataStream {
39-
@mut Stylestream {
40+
@mut StyleStream {
4041
style: style.to_owned(),
4142
} as @mut DataStream
4243
}

0 commit comments

Comments
 (0)