pub fn skip_through(&mut self, amount: usize) -> usize {
        let stdin = io::stdin();
        let mut file = stdin.lock();
        let mut skipped = 0;
        self.start = 0;
        while skipped < amount {
            self.end = 0;
            let returned = self.protected_read(&mut file);
            if returned == 0 {
                // Eof
                self.start = 0;
                self.end = 0;
                break;
            } else if returned >= amount {
                self.start = returned-amount;
                self.end = returned;
                break;
            } else {
                skipped += returned;
            }
        }
        skipped
    }
/// Read N bytes but don't keep them
Read N bytes but don't keep them
Read N bytes but don ' t keep them
pub fn skip_through(&mut self, amount: usize) -> usize {
        let stdin = io::stdin();
        let mut file = stdin.lock();
        let mut skipped = 0;
        self.start = 0;
        while skipped < amount {
            self.end = 0;
            let returned = self.protected_read(&mut file);
            if returned == 0 {
                // Eof
                self.start = 0;
                self.end = 0;
                break;
            } else if returned >= amount {
                self.start = returned-amount;
                self.end = returned;
                break;
            } else {
                skipped += returned;
            }
        }
        skipped
    }
pub fn skip_through ( & mut self , amount : usize ) -> usize { let stdin = io :: stdin ( ) ; let mut file = stdin . lock ( ) ; let mut skipped = 0 ; self . start = 0 ; while skipped < amount { self . end = 0 ; let returned = self . protected_read ( & mut file ) ; if returned == 0 { // Eof self . start = 0 ; self . end = 0 ; break ; } else if returned >= amount { self . start = returned - amount ; self . end = returned ; break ; } else { skipped += returned ; } } skipped }
Read N bytes but don't keep them
Read N bytes but don ' t keep them
&mut self
amount
usize
&mut self
amount
usize