Rename from string to from slice and fuck utf8

This commit is contained in:
2018-05-23 16:25:21 +02:00
parent 1dcea9c05f
commit 4a9e2e7d20
3 changed files with 23 additions and 4 deletions

View File

@@ -76,8 +76,8 @@ impl Machine {
Machine::new_from_reader(reader)
}
pub fn new_from_string(source: String) -> Result<Machine> {
let reader = IJVMReader::new_from_string(source);
pub fn new_from_slice(source: &[u8]) -> Result<Machine> {
let reader = IJVMReader::new_from_slice(source);
Machine::new_from_reader(reader)
}