◐ Shell
reader mode source ↗
Skip to content

Optimize bytes-like (l|r)strip#4500

Merged
youknowone merged 4 commits into
RustPython:mainfrom
dannasman:bytes_lrstrip
Feb 17, 2023
Merged

Optimize bytes-like (l|r)strip#4500
youknowone merged 4 commits into
RustPython:mainfrom
dannasman:bytes_lrstrip

Conversation

@dannasman

Copy link
Copy Markdown
Contributor

Hi!

Here is a solution proposal to #4497. I was not quite sure what the optimization part of #4496 was (I assumed it was the if-else part).

@DimitrisJim DimitrisJim linked an issue Feb 14, 2023 that may be closed by this pull request

@fanninpm fanninpm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hide comment

Does this work? I don't think we need the explicit conversion in these two places, as PartialEq<&[U]> is implemented for Vec<T, A>.

@dannasman dannasman requested review from fanninpm and youknowone and removed request for fanninpm and youknowone February 17, 2023 08:22

@youknowone youknowone left a comment

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.

Hide comment

Great, Thank you!

@youknowone youknowone merged commit a0c34da into RustPython:main Feb 17, 2023
@dannasman dannasman deleted the bytes_lrstrip branch February 17, 2023 20:27
itsankitkp pushed a commit to itsankitkp/RustPython that referenced this pull request Feb 19, 2023
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.

Optimize bytes-like (l|r)strip

3 participants