-
Notifications
You must be signed in to change notification settings - Fork 100
Conversation
@@ -25,6 +25,7 @@ use core::mem::zeroed; | |||
|
|||
use lib::strconv; | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line.
assert!(io.getc() != '0');
assert!(io.getc() == 'a'); This double assertion doesn't make sense, the second line is enough. io.puti(11);
assert!(io.getc() == '1'); This test, if done right, should check that The test case |
TestCharIO { lastchar: Cell::new('0') } | ||
} | ||
fn getc(&self) -> char { | ||
self.lastchar.get() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@farcaller which one do you prefer:
fn getc(&self) -> char {
self.lastchar.get()
}
or:
fn getc(&self) -> char {
return self.lastchar.get();
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first one.
@farcaller sure, I though of checking how many times |
I removed redundant assertions. |
RE |
Yes, that's quite a good option. |
@farcaller I think this is going to be all part of #80 now... closing. Reopen if you want it separate. |
No description provided.