ml-kem/module-lattice: `integer_extend_truncate` warnings
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- cryptography
Direzione di ricerca
Inizia in ml-kem/src/algebra.rs intorno alla riga 123 e ispeziona il trait Truncate e il suo utilizzo, quindi controlla gli attributi del crate in ml-kem/src/lib.rs. Risolvi l'avviso senza fare affidamento su un nome che potrebbe entrare in conflitto con la libreria standard; il lavoro è terminato quando l'avviso è scomparso e l'API scelta rimane chiara.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Just started getting these warnings:
warning: an associated function with this name may be added to the standard library in the future
--> ml-kem/src/algebra.rs:123:27
|
123 | let N = start_n + u8::truncate(i);
| ^^^^^^^^^^^^
|
= help: call with fully qualified syntax `truncate(...)` to keep using the current method
= warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in behavior!
= note: for more information, see issue #48919 <https://github.com/rust-lang/rust/issues/48919>
= note: `#[warn(unstable_name_collisions)]` (part of `#[warn(future_incompatible)]`) on by default
help: add `#![feature(integer_extend_truncate)]` to the crate attributes to enable `core::num::<impl u8>::truncate`
--> ml-kem/src/lib.rs:45:1
|
45 + #![feature(integer_extend_truncate)]
It seems we should at least switch to using Truncate::truncate as the invocation syntax, but also this seems like a case where we should perhaps consider a different API entirely, or at least a different method name, so as not to clash with the standard library.
- Lingua principale
- Rust
- Stelle
- 111
- Fork
- 53
- Merge medio
- 5g 29m
- PR unite (30g)
- 2
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di RustCrypto/KEMs
-
Algorithm::encryption_key_from_decryption_key` skips both of the validations its siblings perform Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
RustCrypto/KEMs#381 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
RustCrypto/KEMs#346 · 2 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
RustCrypto/KEMs#328 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
RustCrypto/KEMs#325 · 1 commento ·
-
Incremental ML-KEM Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
RustCrypto/KEMs#264 · 2 commenti ·
Tutte le issue di RustCrypto/KEMs
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TheLarkInn/aipm#2413 ·
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
todo:ticket
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
taikoxyz/taiko-mono#22168 · 1 commento ·