Allow empty `ConsistentPermutation`
- Lenguaje dominante
- Rust
- Estrellas
- 134
- Forks
- 24
- Merge medio
- 16 h 27 min
- PR fusionados (30 d)
- 11
Descripción
Is there any reason `ConsistentPermutation` doesn't allow `n` to be zero - as per [this assertion](https://github.com/github/rust-gems/blob/main/crates/consistent-choose-k/src/consistent_permutation.rs#L156).
This results in special casing when you're constructing the permutations. We might need a branch at the top of the `next` function to check, but it should be highly predictable.
Guía de contribución
Línea de trabajo
Start in crates/consistent-choose-k/src/consistent_permutation.rs, especially the assertion at line 156 and the next function mentioned in the issue. Verify how n = 0 is currently handled and confirm that empty permutations can be constructed without caller-side special casing.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Activo
- Claridad
- Bien especificado
- Aptitud para principiantes
- 82/100