Merge pull request #3218 from lijm1358/deque-repr

Fix deque `repr` to print correct format
This commit is contained in:
Jeong YunWon
2021-10-05 06:38:09 +09:00
committed by GitHub

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()
};