Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Refactor
  • Loading branch information
sobolevn committed Aug 11, 2021
commit 62972d6dfa259e7b8e35f205c29a4ccac3cd5de8
3 changes: 2 additions & 1 deletion vm/src/stdlib/collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,9 @@ mod _collections {
let skipped = self
.maxlen
.load()
.map(|maxlen| mul.len().wrapping_sub(maxlen))
.and_then(|maxlen| mul.len().checked_sub(maxlen))
.unwrap_or(0);

let deque = mul.skip(skipped).cloned().collect();
PyDeque {
deque: PyRwLock::new(deque),
Expand Down