cursor/cmn/
extras.rs

1// Copyright 2021 Hwakyeom Kim(=just-do-halee)
2
3use super::*;
4
5#[derive(Debug, PartialEq, Eq, Clone, Copy)]
6pub struct NoneExtras<T>(PhantomData<T>);
7impl<T> Extras<T> for NoneExtras<T> {
8    #[inline]
9    fn new() -> Self {
10        Self(PhantomData)
11    }
12    #[inline]
13    fn clone(&self) -> Self {
14        NoneExtras::new()
15    }
16    #[inline]
17    fn change(&mut self, _: &T, _: usize) {}
18    #[inline]
19    fn reset(&mut self) {}
20}