File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 6258857beb447c3f230a226abe65edd9d1b3e142
2
+ refs/heads/master: 0c3b04fa0fc71d319fae14287246126e2e7c84d3
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5
5
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8
Original file line number Diff line number Diff line change @@ -21,14 +21,15 @@ static LIMIT: f64 = 2.0;
21
21
fn main ( ) {
22
22
let args = std:: os:: args ( ) ;
23
23
let ( w, mut out) = if args. len ( ) < 2 {
24
- println ( "Test mode: do not dump the image." ) ;
24
+ println ( "Test mode: do not dump the image because it's not utf8,"
25
+ + " which interferes with the test runner." ) ;
25
26
( 1000 , ~DummyWriter as ~Writer )
26
27
} else {
27
28
( from_str ( args[ 1 ] ) . unwrap ( ) ,
28
29
~BufferedWriter :: new ( std:: io:: stdout ( ) ) as ~Writer )
29
30
} ;
30
31
let h = w;
31
- let mut byte_acc = 0i8 ;
32
+ let mut byte_acc = 0u8 ;
32
33
let mut bit_num = 0 ;
33
34
34
35
writeln ! ( out, "P4\n {} {}" , w, h) ;
@@ -62,12 +63,12 @@ fn main() {
62
63
bit_num += 1 ;
63
64
64
65
if bit_num == 8 {
65
- out. write_i8 ( byte_acc) ;
66
+ out. write_u8 ( byte_acc) ;
66
67
byte_acc = 0 ;
67
68
bit_num = 0 ;
68
69
} else if x == w - 1 {
69
70
byte_acc <<= 8 - w % 8 ;
70
- out. write_i8 ( byte_acc) ;
71
+ out. write_u8 ( byte_acc) ;
71
72
byte_acc = 0 ;
72
73
bit_num = 0 ;
73
74
}
You can’t perform that action at this time.
0 commit comments