Fix a bug we didn't know about

This commit is contained in:
CreepySkeleton 2020-04-26 20:42:21 +03:00
parent c9e03e7e67
commit 312432a5db
2 changed files with 4 additions and 3 deletions

View file

@ -276,7 +276,7 @@ impl<'b, 'c, 'z> Validator<'b, 'c, 'z> {
fn gather_conflicts(&mut self, matcher: &mut ArgMatcher) {
debug!("Validator::gather_conflicts");
for name in matcher.arg_names() {
debug!("Validator::gather_conflicts:iter:{:?}", name);
debug!("Validator::gather_conflicts:iter: id={:?}", name);
// if arg is "present" only because it got default value
// it doesn't conflict with anything
//
@ -285,6 +285,7 @@ impl<'b, 'c, 'z> Validator<'b, 'c, 'z> {
.get(name)
.map_or(false, |a| a.ty == ValueType::DefaultValue)
{
debug!("Validator::gather_conflicts:iter: This is default value, skipping.",);
continue;
}

View file

@ -28,9 +28,9 @@ impl BufferWriter {
pub(crate) fn print(&self, buf: &Buffer) -> Result<()> {
if self.use_stderr {
stderr().lock().write(buf)?;
stderr().lock().write_all(buf)?;
} else {
stdout().lock().write(buf)?;
stdout().lock().write_all(buf)?;
}
Ok(())