Skip to content

Refactor use trait to combine the slice operation#2180

Merged
youknowone merged 6 commits into
RustPython:masterfrom
qingshi163:dev_slice_vec
Sep 6, 2020
Merged

Refactor use trait to combine the slice operation#2180
youknowone merged 6 commits into
RustPython:masterfrom
qingshi163:dev_slice_vec

Conversation

@qingshi163
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

impressive, Nice work!

Comment thread vm/src/obj/objsequence.rs Outdated
use crate::pyobject::{BorrowValue, PyObject, PyObjectRef, PyResult, TryFromObject, TypeProtocol};
use crate::vm::VirtualMachine;

pub trait PySliceableSequenceMut: PySliceableSequence {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this trait require PySliceableSequence? If fn as_slice(&self) -> PySliceableSequence is possible, we can skip impl PySliceableSequence for Vec which may causes unexpected cost

Copy link
Copy Markdown
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely a lot better than before

@youknowone youknowone merged commit a5d0df2 into RustPython:master Sep 6, 2020
@qingshi163 qingshi163 deleted the dev_slice_vec branch September 6, 2020 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants