Merge branch 'master' into x11kb

This commit is contained in:
Dorota Czaplejewicz
2020-10-03 12:34:38 +00:00
12 changed files with 191 additions and 37 deletions

View File

@ -743,8 +743,7 @@ fn extract_symbol_names<'a>(actions: &'a [(&str, action::Action)])
#[cfg(test)]
mod tests {
use super::*;
use std::error::Error as ErrorTrait;
use ::logging::ProblemPanic;
const THIS_FILE: &str = file!();
@ -792,7 +791,8 @@ mod tests {
Err(e) => {
let mut handled = false;
if let Error::Yaml(ye) = &e {
handled = ye.description() == "missing field `views`";
handled = ye.to_string()
.starts_with("missing field `views`");
};
if !handled {
println!("Unexpected error {:?}", e);
@ -810,7 +810,7 @@ mod tests {
Err(e) => {
let mut handled = false;
if let Error::Yaml(ye) = &e {
handled = ye.description()
handled = ye.to_string()
.starts_with("unknown field `bad_field`");
};
if !handled {