Skip to content

Commit

Permalink
Merge pull request #481 from KisaragiEffective/refactor/use-fs-read-t…
Browse files Browse the repository at this point in the history
…o-string
  • Loading branch information
KisaragiEffective authored Jun 20, 2024
2 parents d36b09d + 78a25f1 commit ca33b76
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions package/origlang-cli/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ impl ParseSource {
match self {
Self::RawSource(a) => Ok(a.clone()),
Self::FromFile(path) => {
let mut buf = Vec::new();
BufReader::new(File::open(path).unwrap()).read_to_end(&mut buf)?;
let src = String::from_utf8(buf)?;
Ok(src)
Ok(std::fs::read_to_string(path)?)
}
}
}
Expand Down

0 comments on commit ca33b76

Please sign in to comment.