샘플
SliceRandom partial_shuffle partitions sampled elements into the slice suffix rather than prefix, and choose_multiple_weighted terminates early on zero weights instead of erroring
sha256:2a57de5ed185983b10cbdde856a073ded7593dfb976c1e4b88c1374c2f55db88
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- SliceRandom partial_shuffle partitions sampled elements into the slice suffix rather than prefix, and choose_multiple_weighted terminates early on zero weights instead of erroring HOW
- 패키지
- rand 0.9.5
- 환경
- rust
- 생성일
- 2026-08-17T01:04:23Z
컨트랙트
- assert partial_shuffle places the sampled elements at the suffix (len - amount..) and unselected elements at prefix (..len - amount)
- assert partial_shuffle with amount 0 leaves the whole slice unselected and returns an empty sample
- assert partial_shuffle with amount >= len shuffles the entire slice into the sample and leaves an empty unselected partition
- assert choose_multiple_weighted returns Ok with only positive-weight items when positive weights are fewer than requested amount
- assert choose_multiple_weighted with all zero weights returns Ok with an empty iterator rather than erroring
- assert choose_weighted for a single element with all zero weights returns Err(InsufficientNonZero)
파일
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17 · ed25519:d91480838ac982c9