Skip to content

Commit

Permalink
desc: fix format string for panic (#391)
Browse files Browse the repository at this point in the history
This fixes a compile error on current beta toolchain, which started
enforcing that panic messages must be string literals (with format
specifiers).

Signed-off-by: Luca BRUNO <luca.bruno@coreos.com>
  • Loading branch information
lucab committed Feb 19, 2021
1 parent 021d07b commit 8e2d9e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/desc.rs
Expand Up @@ -257,7 +257,7 @@ mod tests {
.expect(format!("expected error for {}", name).as_ref());
match res {
Error::Msg(msg) => assert_eq!(msg, format!("'{}' is not a valid label name", name)),
other => panic!(other),
other => panic!("{}", other),
};
}
}
Expand All @@ -272,7 +272,7 @@ mod tests {
.expect(format!("expected error for {}", name).as_ref());
match res {
Error::Msg(msg) => assert_eq!(msg, format!("'{}' is not a valid label name", name)),
other => panic!(other),
other => panic!("{}", other),
};
}
}
Expand All @@ -287,7 +287,7 @@ mod tests {
Error::Msg(msg) => {
assert_eq!(msg, format!("'{}' is not a valid metric name", name))
}
other => panic!(other),
other => panic!("{}", other),
};
}
}
Expand Down

0 comments on commit 8e2d9e8

Please sign in to comment.