Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Investigate `min_generic_const_args` for handling array sizes generically

未关闭
#180 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
rust
领域
compilers

调研方向

首先阅读 src/sizes.rs 以了解当前的固定大小宏方案,然后查看 nightly min_generic_const_args 目标。使用 typenum::Unsigned::USIZE 作为 Array 类型的 N 构建一个概念验证;对于相关用例,任意大小都能正常工作并确认该方案可行,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Currently we use macros to write a fixed set of supported sizes, which is inflexible and we would ideally support arbitrary sizes instead (#81). See:

https://github.com/RustCrypto/hybrid-array/blob/master/src/sizes.rs

It seems like min_const_generic_args could be the missing compiler feature we need to be able to use the associated constant typenum::Unsigned::USIZE as N for [T; N] when defining our Array type.

It would be good to try to make this work on nightly in a proof-of-concept capacity to ensure it will actually work for our use cases. It would also make a compelling use case for min_const_generic_args.

cc @BoxyUwU

主要语言
Rust
星标
23
派生
25
平均合并
1 小时 46 分钟
30 天内合并 PR
1

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

RustCrypto/hybrid-array 的其他 Issue

查看 RustCrypto/hybrid-array 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。