diff --git a/src/core/config/npo/chunk.rs b/src/core/config/npo/chunk.rs index d243f73a17..a315ec8683 100644 --- a/src/core/config/npo/chunk.rs +++ b/src/core/config/npo/chunk.rs @@ -5,8 +5,8 @@ use std::rc::Rc; /// operations #[derive(Hash, Eq, PartialEq, Debug, Clone)] pub enum Chunk { - Nil, - Cons(A, Rc>), + Empty, + Append(A, Rc>), Concat(Rc>, Rc>), } @@ -18,15 +18,15 @@ impl Default for Chunk { impl Chunk { pub fn new() -> Self { - Self::Nil + Self::Empty } pub fn is_null(&self) -> bool { - matches!(self, Chunk::Nil) + matches!(self, Chunk::Empty) } pub fn append(self, a: A) -> Self { - Chunk::Cons(a, Rc::new(self)) + Chunk::Append(a, Rc::new(self)) } pub fn concat(self, other: Chunk) -> Self { @@ -47,8 +47,8 @@ impl Chunk { pub fn as_vec_mut<'a>(&'a self, buf: &mut Vec<&'a A>) { match self { - Chunk::Nil => {} - Chunk::Cons(a, rest) => { + Chunk::Empty => {} + Chunk::Append(a, rest) => { rest.as_vec_mut(buf); buf.push(a); }