find deletion on pull

This commit is contained in:
grimhilt
2023-08-27 22:50:51 +02:00
parent 57647e5df2
commit 863e3bd68a
7 changed files with 260 additions and 81 deletions

View File

@@ -58,9 +58,10 @@ impl Object {
match read::read_lines(&self.obj_p) {
Ok(mut reader) => {
if let Some(Ok(line)) = reader.next() {
let mut data = line.rsplit(' ');
if data.clone().count() >= 2 {
self.ts = Some(data.next().unwrap().parse::<i64>().unwrap())
let mut data = line.rsplit(' ').collect::<Vec<_>>();
data.reverse();
if data.clone().len() >= 2 {
self.ts = Some(data[1].parse::<i64>().unwrap())
}
}
},