Skip to content

Commit ba946ab

Browse files
committed
wip
1 parent 28eedfa commit ba946ab

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

lightning-background-processor/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ impl BackgroundProcessor {
998998
O: 'static + Deref,
999999
K: 'static + Deref,
10001000
OS: 'static
1001-
+ Deref<Target = OutputSweeperSync<T, D, F, CF, KVStoreSyncWrapper<K>, L, O>>
1001+
+ Deref<Target = OutputSweeperSync<T, D, F, CF, Arc<KVStoreSyncWrapper<K>>, L, O>>
10021002
+ Send,
10031003
FS: FutureSpawner,
10041004
>(

lightning/src/util/persist.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,16 +215,24 @@ pub trait KVStoreSync {
215215
}
216216

217217
/// A wrapper around a [`KVStoreSync`] that implements the [`KVStore`] trait.
218-
pub struct KVStoreSyncWrapper<K: KVStoreSync>(Arc<K>);
218+
pub struct KVStoreSyncWrapper<K: Deref>(Arc<K>)
219+
where
220+
K::Target: KVStoreSync;
219221

220-
impl<K: KVStoreSync> KVStoreSyncWrapper<K> {
222+
impl<K: Deref> KVStoreSyncWrapper<K>
223+
where
224+
K::Target: KVStoreSync,
225+
{
221226
/// Constructs a new [`KVStoreSyncWrapper`].
222227
pub fn new(kv_store: Arc<K>) -> Self {
223228
Self(kv_store)
224229
}
225230
}
226231

227-
impl<K: KVStoreSync> KVStore for KVStoreSyncWrapper<K> {
232+
impl<K: Deref> KVStore for KVStoreSyncWrapper<K>
233+
where
234+
K::Target: KVStoreSync,
235+
{
228236
fn read(
229237
&self, primary_namespace: &str, secondary_namespace: &str, key: &str,
230238
) -> AsyncResultType<'static, Vec<u8>, io::Error> {

0 commit comments

Comments
 (0)