Add group hovers

This commit is contained in:
Nathan Sobo 2023-10-11 21:34:08 -06:00
parent f37b83a0ea
commit d920f7edc1
21 changed files with 157 additions and 103 deletions

View file

@ -17,7 +17,7 @@ pub trait Refineable: Clone {
{
Self::default().refined(refinement)
}
fn from_cascade(cascade: &RefinementCascade<Self>) -> Self
fn from_cascade(cascade: &Cascade<Self>) -> Self
where
Self: Default + Sized,
{
@ -25,9 +25,9 @@ pub trait Refineable: Clone {
}
}
pub struct RefinementCascade<S: Refineable>(Vec<Option<S::Refinement>>);
pub struct Cascade<S: Refineable>(Vec<Option<S::Refinement>>);
impl<S: Refineable + Default> Default for RefinementCascade<S> {
impl<S: Refineable + Default> Default for Cascade<S> {
fn default() -> Self {
Self(vec![Some(Default::default())])
}
@ -36,7 +36,7 @@ impl<S: Refineable + Default> Default for RefinementCascade<S> {
#[derive(Copy, Clone)]
pub struct CascadeSlot(usize);
impl<S: Refineable + Default> RefinementCascade<S> {
impl<S: Refineable + Default> Cascade<S> {
pub fn reserve(&mut self) -> CascadeSlot {
self.0.push(None);
return CascadeSlot(self.0.len() - 1);