Skip to content

const-ify BytesMut::len, BytesMut::is_empty, and BytesMut::capacity,#516

Open
Cyborus04 wants to merge 1 commit into
tokio-rs:masterfrom
Cyborus04:constify
Open

const-ify BytesMut::len, BytesMut::is_empty, and BytesMut::capacity,#516
Cyborus04 wants to merge 1 commit into
tokio-rs:masterfrom
Cyborus04:constify

Conversation

@Cyborus04

Copy link
Copy Markdown
Contributor

No description provided.

@taiki-e

taiki-e commented Nov 11, 2021

Copy link
Copy Markdown
Member

Is there a way to create BytesMut in const? If not, this does not seem to be available in practice.

@taiki-e

taiki-e commented Nov 11, 2021

Copy link
Copy Markdown
Member

Ah, it was previously proposed, but I closed it for compatibility with future implementation changes. #472 (review)

@Cyborus04

Copy link
Copy Markdown
Contributor Author

I guess there isn't, you're right. I think new could be made const, but I'm not sure how useful that would be.

@Cyborus04

Copy link
Copy Markdown
Contributor Author

Ah, yep, haha

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