~dkellner/chronofold

7588abc955e0e0f99631cd6aba8cb61007cbb01c — Dominik Kellner 1 year, 3 months ago 029579c
Address new Clippy warnings
3 files changed, 3 insertions(+), 2 deletions(-)

M src/distributed.rs
M src/offsetmap.rs
M src/session.rs
M src/distributed.rs => src/distributed.rs +1 -1
@@ 95,7 95,7 @@ impl<A, T> OpPayload<A, T> {
        match self {
            Root => None,
            Insert(reference, _) => reference.as_ref(),
            Delete(reference) => Some(&reference),
            Delete(reference) => Some(reference),
        }
    }
}

M src/offsetmap.rs => src/offsetmap.rs +1 -1
@@ 31,7 31,7 @@ impl<K: Ord, O> OffsetMap<K, O> {

impl<K: Ord, O: Offset<K>> OffsetMap<K, O> {
    pub fn get(&self, key: &K) -> Option<K> {
        match self.map.get(&key) {
        match self.map.get(key) {
            Some(None) => None,
            Some(Some(offset)) => Some(offset.add(key)),
            None => Some(O::default().add(key)),

M src/session.rs => src/session.rs +1 -0
@@ 81,6 81,7 @@ impl<'a, A: Author, T> Session<'a, A, T> {
        self.splice(oob..oob, iter)
    }

    #[allow(clippy::needless_collect)] // collect is needed due to borrowing
    /// Replaces the specified range in the chronofold with the given
    /// `replace_with` iterator and returns the log index of the last inserted
    /// element, if any.