rand: fix fallout
This commit is contained in:
parent
41df05dd0e
commit
3fdd4b366a
1 changed files with 7 additions and 2 deletions
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#![feature(macro_rules, phase, globs)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(associated_types)]
|
||||
#![no_std]
|
||||
#![experimental]
|
||||
|
||||
|
|
@ -314,7 +315,9 @@ pub struct Generator<'a, T, R:'a> {
|
|||
rng: &'a mut R,
|
||||
}
|
||||
|
||||
impl<'a, T: Rand, R: Rng> Iterator<T> for Generator<'a, T, R> {
|
||||
impl<'a, T: Rand, R: Rng> Iterator for Generator<'a, T, R> {
|
||||
type Item = T;
|
||||
|
||||
fn next(&mut self) -> Option<T> {
|
||||
Some(self.rng.gen())
|
||||
}
|
||||
|
|
@ -327,7 +330,9 @@ pub struct AsciiGenerator<'a, R:'a> {
|
|||
rng: &'a mut R,
|
||||
}
|
||||
|
||||
impl<'a, R: Rng> Iterator<char> for AsciiGenerator<'a, R> {
|
||||
impl<'a, R: Rng> Iterator for AsciiGenerator<'a, R> {
|
||||
type Item = char;
|
||||
|
||||
fn next(&mut self) -> Option<char> {
|
||||
static GEN_ASCII_STR_CHARSET: &'static [u8] =
|
||||
b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue