@@ -3,8 +3,6 @@
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
use crate::key::KeySlice;
|
||||
|
||||
use super::StorageIterator;
|
||||
|
||||
/// Merges two iterators of different types into one. If the two iterators have the same key, only
|
||||
@@ -16,8 +14,8 @@ pub struct TwoMergeIterator<A: StorageIterator, B: StorageIterator> {
|
||||
}
|
||||
|
||||
impl<
|
||||
A: 'static + for<'a> StorageIterator<KeyType<'a> = KeySlice<'a>>,
|
||||
B: 'static + for<'a> StorageIterator<KeyType<'a> = KeySlice<'a>>,
|
||||
A: 'static + StorageIterator,
|
||||
B: 'static + for<'a> StorageIterator<KeyType<'a> = A::KeyType<'a>>,
|
||||
> TwoMergeIterator<A, B>
|
||||
{
|
||||
pub fn create(a: A, b: B) -> Result<Self> {
|
||||
@@ -26,13 +24,13 @@ impl<
|
||||
}
|
||||
|
||||
impl<
|
||||
A: 'static + for<'a> StorageIterator<KeyType<'a> = KeySlice<'a>>,
|
||||
B: 'static + for<'a> StorageIterator<KeyType<'a> = KeySlice<'a>>,
|
||||
A: 'static + StorageIterator,
|
||||
B: 'static + for<'a> StorageIterator<KeyType<'a> = A::KeyType<'a>>,
|
||||
> StorageIterator for TwoMergeIterator<A, B>
|
||||
{
|
||||
type KeyType<'a> = KeySlice<'a>;
|
||||
type KeyType<'a> = A::KeyType<'a>;
|
||||
|
||||
fn key(&self) -> KeySlice {
|
||||
fn key(&self) -> Self::KeyType<'_> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user