fix deque repr to print correct format

This commit is contained in:
lijm1358
2021-10-05 00:28:55 +09:00
parent bbbdaf32e4
commit 2a044d56d8

View File

@@ -420,7 +420,12 @@ mod _collections {
.maxlen
.map(|maxlen| format!(", maxlen={}", maxlen))
.unwrap_or_default();
format!("deque([{}]{})", elements.into_iter().format(", "), maxlen)
format!(
"{}([{}]{})",
zelf.class().name(),
elements.into_iter().format(", "),
maxlen
)
} else {
"[...]".to_owned()
};