Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

cmov: add correct usage examples for both `Cmov` and `CmovEq`

Aperta
#921 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
45/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
documentation

Direzione di ricerca

Inizia leggendo i test esistenti per Cmov e CmovEq, quindi confronta la loro struttura con quella di altri esempi di RustCrypto. Aggiungi esempi d’uso chiari e commentati per entrambe le API e documenta le precauzioni relative all’uso diretto di Cmov, alle condizioni con ==, ai rami e all’operatore ^; gli esempi dovrebbero seguire il formato stabilito del repository.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I plan to get these done later today also, and they'll follow the tests as a rough example (but obviously cleaner, easier to understand and commented so users know what's going on).

I plan to add warnings about using Cmov directly, as it would act more of an optimisation barrier if a condition is set to x == y.

I may also add warnings about branching in general, and using the ^ operator where the functions provided by CmovEq aren't adequate (which will be extremely unlikely but still probably worth noting). I'll also briefly explain why using == is bad, but I'm no branching expert so that may require some tweaking.

I'll try to adhere to the RustCrypto example format in order to reduce PR review time, and for consistency.

I think I'll try and get #920 fixed up first though.

Lingua principale
Rust
Stelle
674
Fork
170
Merge medio
1g 12h
PR unite (30g)
10

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RustCrypto/utils

Tutte le issue di RustCrypto/utils

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.