crates.io source files differ in length from repo source files

because crlf->lf conversions
This commit is contained in:
bunnie 2022-10-05 21:25:54 +08:00
parent 3b9041d8d7
commit 8f71164278

View file

@ -228,9 +228,10 @@ fn compare_files(a: &Path, b: &Path) -> Result<bool, DynError> {
let f2 = File::open(b)?;
// check if file sizes are the same
if f1.metadata().unwrap().len() != f2.metadata().unwrap().len() {
return Ok(false);
}
// HAHA joke is on me, this doesn't work because CRLF->LF conversions.
// if f1.metadata().unwrap().len() != f2.metadata().unwrap().len() {
// return Ok(false);
// }
let s1 = fs::read_to_string(a);
let s2 = fs::read_to_string(b);