term: Change signature of Constraint::from_env

Return `None` if there's no terminal.
This commit is contained in:
cloudhead
2023-09-27 15:17:07 +02:00
parent 6a5753f4bc
commit bb40347121
3 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -372,6 +372,6 @@ mod test {
let mut hi = Highlighter::default();
let pretty = diff.pretty(&mut hi, &(), &repo);
pretty.write(Constraint::from_env().maximize());
pretty.write(Constraint::from_env().unwrap_or_default());
}
}