@@ 41,7 41,7 @@ fn read_states(path: str) (strings::tokenizer | fs::error | io::error) = {
case =>
abort("Unexpected EOF from sysfs");
};
- const string = strings::rtrim(strings::fromutf8(buf[..z]), '\n');
+ const string = strings::rtrim(strings::fromutf8(buf[..z])!, '\n');
return strings::tokenize(string, " ");
};
@@ 255,7 255,7 @@ fn read_image_size() (size | fs::error | io::error) = {
abort("Unexpected EOF from /sys/power/image_size");
};
- const val = strings::rtrim(strings::fromutf8(buf[..z]), '\n');
+ const val = strings::rtrim(strings::fromutf8(buf[..z])!, '\n');
match (strconv::stoz(val)) {
case let z: size =>
return z;