better naming: str --> string
Suggested by @notoria in #589. Many thanks!
This commit is contained in:
@@ -2274,8 +2274,7 @@ impl MachineState {
|
||||
_ => { unreachable!() }
|
||||
};
|
||||
|
||||
let chars = {
|
||||
let mut str = String::new();
|
||||
let mut string = String::new();
|
||||
|
||||
if stream.options.stream_type == StreamType::Binary {
|
||||
let mut mstream = stream.clone();
|
||||
@@ -2284,7 +2283,7 @@ impl MachineState {
|
||||
|
||||
match mstream.read(&mut b) {
|
||||
Ok(1) => {
|
||||
str.push(b[0] as char);
|
||||
string.push(b[0] as char);
|
||||
}
|
||||
_ => {
|
||||
break;
|
||||
@@ -2302,17 +2301,15 @@ impl MachineState {
|
||||
|
||||
match result {
|
||||
Some(Ok(c)) => {
|
||||
str.push(c);
|
||||
string.push(c);
|
||||
}
|
||||
_ => { break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
str
|
||||
};
|
||||
let str = self.heap.put_complete_string(&chars);
|
||||
self.unify(self[temp_v!(3)], str);
|
||||
let string = self.heap.put_complete_string(&string);
|
||||
self.unify(self[temp_v!(3)], string);
|
||||
}
|
||||
&SystemClauseType::GetCode => {
|
||||
let mut stream =
|
||||
|
||||
Reference in New Issue
Block a user