ソースを参照

make filter condition a bit more obvious

Lucas Stadler 10 年 前
コミット
7b3037355f
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      rust/solve/src/cnf.rs

+ 1 - 1
rust/solve/src/cnf.rs

@ -26,7 +26,7 @@ pub struct CNF {
26 26
/// line specifies this.  Each following line represents a clause with possibly
27 27
/// negated literals, terminated by 0 and a newline.
28 28
pub fn parse_dimac(dimac: &str) -> Result<CNF, String> {
29
	let mut lines = dimac.lines().filter(|l| !(l.starts_with("c") || l.trim() == ""));
29
	let mut lines = dimac.lines().filter(|l| !l.starts_with("c") && l.trim() != "");
30 30
	let mut num_vars;
31 31
	let mut num_clauses;
32 32