Use content-type for error message

This commit is contained in:
Jonathan Giddy 2016-02-23 10:54:54 +00:00
parent ab43e2b028
commit 94f5d26131

View file

@ -317,7 +317,10 @@ impl MIMEChecker for ByteMatcher {
fn validate(&self) -> Result<(), String> {
if self.pattern.len() != self.mask.len() {
Err(format!("Unequal pattern and mask length for pattern {:?}", self.pattern))
Err(format!(
"Unequal pattern and mask length for {}/{}",
self.content_type.0, self.content_type.1
))
}
else {
Ok(())