tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

14 lignes · 357 octetsBrut · Historique
1// The runtime's `random` handler refuses a negative count, on both
2// backends (ADR 0036).
3
4import std/bytes
5import std/io
6import std/random.{type random}
7
8pub fn main :: -> () / <io, random>
9{
10 io.println "{bytes.length (random.bytes 2)}"
11 io.println "never printed {bytes.length (random.bytes (-1))}"
12}
13//> 2
14//! panic: random.bytes: negative count -1