Moved CellView to Node.

Dependency layout adjustments.
rustfmt modifications.
This commit is contained in:
Zachary Sunforge
2023-04-09 08:03:41 -07:00
parent d9bc0a8da8
commit feebce2b07
5 changed files with 34 additions and 26 deletions

View File

@ -1,13 +0,0 @@
use core::cell::Cell;
/// Provides a view only reference to a [Cell].
/// Useful alternative to `&Cell` when an API wants to control where a [Cell]s value can be set.
#[derive(Copy, Clone)]
pub struct CellView<'a, T: Copy>(&'a Cell<T>);
impl<'a, T: Copy> CellView<'a, T> {
#[inline]
pub fn get(self) -> T {
self.0.get()
}
}

View File

@ -1,3 +1,2 @@
#![no_std]
mod cell;