it: read_entire_file use built in

This commit is contained in:
Quaternions 2025-03-11 14:07:24 -07:00
parent a2369b4211
commit fc3681f41f

@ -1,5 +1,5 @@
use std::io::{Cursor,Read};
use std::io::Cursor;
use std::path::Path;
use std::time::Instant;
@ -39,9 +39,7 @@ impl From<strafesnet_snf::bot::Error> for ReplayError{
}
fn read_entire_file(path:impl AsRef<Path>)->Result<Cursor<Vec<u8>>,std::io::Error>{
let mut file=std::fs::File::open(path)?;
let mut data=Vec::new();
file.read_to_end(&mut data)?;
let data=std::fs::read(path)?;
Ok(Cursor::new(data))
}