Skip to content

Make VertexFormat::size a const fn#1048

Merged
bors[bot] merged 1 commit intogfx-rs:masterfrom
Imberflur:const-size-fn
Nov 26, 2020
Merged

Make VertexFormat::size a const fn#1048
bors[bot] merged 1 commit intogfx-rs:masterfrom
Imberflur:const-size-fn

Conversation

@Imberflur
Copy link
Copy Markdown
Contributor

Connections
Addresses #836

Description
The vertex_attr_array! macro uses this function. This change enables the macro to be used in const contexts and for instance allows returning a VertexBufferDescriptor constructed in function without having the difficulties of ensuring the array from vertex_attr_array! lives long enough.

Testing
I don't believe testing is needed for this.

Copy link
Copy Markdown
Contributor

@monocodus monocodus bot left a comment

Choose a reason for hiding this comment

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

This is an autogenerated code review.

Checker summary (by rust_clippy):
The tool has found 76 warnings, 0 errors.

Copy link
Copy Markdown
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

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

thank you!
bors r+

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Nov 26, 2020

@bors bors bot merged commit 75b4697 into gfx-rs:master Nov 26, 2020
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