Skip to content

Use the counted_array macro for the ARGS arrays#298

Merged
luser merged 1 commit intomozilla:masterfrom
glandium:counted_array
Oct 9, 2018
Merged

Use the counted_array macro for the ARGS arrays#298
luser merged 1 commit intomozilla:masterfrom
glandium:counted_array

Conversation

@glandium
Copy link
Collaborator

One of the most annoying thing from using static arrays in rust is that
there is no size inference, and you end up having to give the proper
size. Which makes updates to the arrays cumbersome.

I was reading "This Week in Rust 252", which linked to (RFC: Elide array
size)[https://github.com/rust-lang/rfcs/pull/2545], set to address this
very problem, and @durka linked to his counted-arrays crate, which
already existed and essentially implements the idea behind the RFC.

@luser
Copy link
Contributor

luser commented Sep 19, 2018

Thanks! I was thinking this same thing when I last touched one of the args arrays but I didn't get around to writing the patch. Let me just make sure this isn't going to conflict with #294.

One of the most annoying thing from using static arrays in rust is that
there is no size inference, and you end up having to give the proper
size. Which makes updates to the arrays cumbersome.

I was reading "This Week in Rust 252", which linked to (RFC: Elide array
size)[rust-lang/rfcs#2545], set to address this
very problem, and @durka linked to his counted-arrays crate, which
already existed and essentially implements the idea behind the RFC.
@luser luser merged commit 7f37dca into mozilla:master Oct 9, 2018
tottoto pushed a commit to tottoto/sccache that referenced this pull request Feb 6, 2026
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