Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions lightning-persister/src/fs_store.rs
Original file line numberDiff line numberDiff line change
Expand Up@@ -477,9 +477,7 @@ impl KVStore for FilesystemStore {
};

Box::pin(async move {
tokio::task::spawn_blocking(move || this.read(path)).await.unwrap_or_else(|e| {
Err(lightning::io::Error::new(lightning::io::ErrorKind::Other, e))
})
tokio::task::spawn_blocking(move || this.read(path)).await
})
}

Expand All@@ -503,7 +501,6 @@ impl KVStore for FilesystemStore {
this.write_version(inner_lock_ref, path, buf, version)
})
.await
.unwrap_or_else(|e| Err(lightning::io::Error::new(lightning::io::ErrorKind::Other, e)))
})
}

Expand All@@ -527,7 +524,6 @@ impl KVStore for FilesystemStore {
this.remove_version(inner_lock_ref, path, lazy, version)
})
.await
.unwrap_or_else(|e| Err(lightning::io::Error::new(lightning::io::ErrorKind::Other, e)))
})
}

Expand All@@ -547,9 +543,7 @@ impl KVStore for FilesystemStore {
};

Box::pin(async move {
tokio::task::spawn_blocking(move || this.list(path)).await.unwrap_or_else(|e| {
Err(lightning::io::Error::new(lightning::io::ErrorKind::Other, e))
})
tokio::task::spawn_blocking(move || this.list(path)).await
})
}
}
Expand Down
Loading