projects
/
crypto_lab1.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
b6be23ae0ef32e3e64765286ef446801ff67ac70
[crypto_lab1.git]
/
lab1_rust
/
src
/
utils.rs
1
2
pub fn
from_elem
<
T
:
Copy
>(
nb_elem
:
uint
,
t
:
T
) ->
Vec
<
T
> {
3
let mut
v
=
Vec
::
with_capacity
(
nb_elem
);
4
for
_
in
range
(
0u
,
nb_elem
) {
5
v
.
push
(
t
);
6
}
7
v
8
}