src/config/network/parser.rs: remove debug println

This commit is contained in:
Dietmar Maurer 2020-04-22 10:53:26 +02:00
parent 0c226bc173
commit e2d940b949
1 changed files with 3 additions and 8 deletions

View File

@ -73,7 +73,6 @@ impl <R: BufRead> NetworkParser<R> {
loop { loop {
match self.next()? { match self.next()? {
(Token::Text, iface) => { (Token::Text, iface) => {
println!("AUTO {}", iface);
auto_flag.insert(iface.to_string()); auto_flag.insert(iface.to_string());
} }
(Token::Newline, _) => break, (Token::Newline, _) => break,
@ -232,20 +231,16 @@ impl <R: BufRead> NetworkParser<R> {
let mut auto_flag: HashSet<String> = HashSet::new(); let mut auto_flag: HashSet<String> = HashSet::new();
loop { loop {
let peek = self.peek()?; match self.peek()? {
println!("TOKEN: {:?}", peek);
match peek {
Token::EOF => { Token::EOF => {
// fixme: trailing comments
break; break;
} }
Token::Newline => { Token::Newline => {
// skip empty lines
self.eat(Token::Newline)?; self.eat(Token::Newline)?;
// fixme end of entry
} }
Token::Comment => { Token::Comment => {
let (_, text) = self.next()?; let (_, text) = self.next()?;
println!("COMMENT: {}", text);
config.order.push(NetworkOrderEntry::Comment(text)); config.order.push(NetworkOrderEntry::Comment(text));
self.eat(Token::Newline)?; self.eat(Token::Newline)?;
} }