Okay Rustaceans: what's your favorite (theoretical or implemented!) use case for #Rust's new const generics?
-
Diesen Thread anzeigen
-
While there are others that are more important for e.g. reducing compile times, I think being able to reasonably build transparent types like NSlice<T, N> { arr: [T; N], slice: [T] } is extremely cool.
1 Antwort 0 Retweets 3 Gefällt mirDiesen Thread anzeigen
Antwort an @NoraDotCodes
good hex literals for long blobs: decode the string at compile time. this is possible with some nightly iirc. sadly it currently requires unsafe and some feature flags because there's no from_utf8 with const due to implementation details related issues.
14:28 - 11. Juni 2021
0 Antworten
0 Retweets
1 Gefällt mir
Das Laden scheint etwas zu dauern.
Twitter ist möglicherweise überlastet oder hat einen vorübergehenden Schluckauf. Probiere es erneut oder besuche Twitter Status für weitere Informationen.
∪
∪ white // she/her