forked from libre-chip/fayalite
implement Display for SimValue<T>
This commit is contained in:
parent
17b58e8edb
commit
053c1b2b10
1 changed files with 7 additions and 1 deletions
|
|
@ -157,7 +157,13 @@ pub struct SimValue<T: Type> {
|
||||||
inner: AlternatingCell<SimValueInner<T>>,
|
inner: AlternatingCell<SimValueInner<T>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Type + Clone> Clone for SimValue<T> {
|
impl<T: Type<SimValue: fmt::Display>> fmt::Display for SimValue<T> {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
T::SimValue::fmt(self, f)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<T: Type> Clone for SimValue<T> {
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
Self {
|
Self {
|
||||||
inner: AlternatingCell::new_unique(self.inner.share().clone()),
|
inner: AlternatingCell::new_unique(self.inner.share().clone()),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue