mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-13 09:49:11 +03:00
Improve RocList's Debug implementation
This commit is contained in:
parent
52dc1fb723
commit
97fef48864
@ -4,7 +4,7 @@ use core::{
|
||||
cell::Cell,
|
||||
cmp::{self, Ordering},
|
||||
ffi::c_void,
|
||||
fmt::Debug,
|
||||
fmt::{self, Debug},
|
||||
hash::Hash,
|
||||
intrinsics::copy_nonoverlapping,
|
||||
iter::FromIterator,
|
||||
@ -421,8 +421,10 @@ impl<T> Debug for RocList<T>
|
||||
where
|
||||
T: Debug,
|
||||
{
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
self.deref().fmt(f)
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.write_str("RocList ")?;
|
||||
|
||||
f.debug_list().entries(self.iter()).finish()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user