Compare commits
2 Commits
a867809cb8
...
51f10b7944
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51f10b7944 | ||
|
|
9ed6b48806 |
@@ -203,13 +203,12 @@ impl File {
|
|||||||
if !after.contains(before) {
|
if !after.contains(before) {
|
||||||
self.append(Delta::remove_at(before.clone(), now))?;
|
self.append(Delta::remove_at(before.clone(), now))?;
|
||||||
let now = Delta::now_time();
|
let now = Delta::now_time();
|
||||||
if let due = before.must_next_due(now.clone()) {
|
let due = before.must_next_due(now.clone());
|
||||||
if due >= now {
|
if due >= now {
|
||||||
self.append(Delta::add_at(before.clone(), due))?;
|
self.append(Delta::add_at(before.clone(), due))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
for after in after.iter() {
|
for after in after.iter() {
|
||||||
if !before.contains(after) {
|
if !before.contains(after) {
|
||||||
self.append(Delta::add_at(after.clone(), now))?;
|
self.append(Delta::add_at(after.clone(), now))?;
|
||||||
@@ -990,6 +989,7 @@ mod tests {
|
|||||||
f.sync_all().unwrap();
|
f.sync_all().unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn file_contains(d: &tempdir::TempDir, fname: &str, content: &str) {
|
pub fn file_contains(d: &tempdir::TempDir, fname: &str, content: &str) {
|
||||||
let p = d.path().join(&fname);
|
let p = d.path().join(&fname);
|
||||||
let file_content = file_content(&p.to_str().unwrap().to_string());
|
let file_content = file_content(&p.to_str().unwrap().to_string());
|
||||||
|
|||||||
Reference in New Issue
Block a user