mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-24 02:31:44 +03:00
style
This commit is contained in:
parent
3ef3cc3f25
commit
1090c3e55e
@ -39,8 +39,7 @@ pub enum TestError {
|
|||||||
impl fmt::Display for TestError {
|
impl fmt::Display for TestError {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
let format_test =
|
let format_test =
|
||||||
|test: &str| -> String { if test.len() > 50 { String::new() } else { format!("\n\n{test}\n\n") }
|
|test: &str| -> String { if test.len() > 50 { String::new() } else { format!("\n\n{test}\n\n") } };
|
||||||
};
|
|
||||||
match self {
|
match self {
|
||||||
TestError::Panicked { test, index, error } => {
|
TestError::Panicked { test, index, error } => {
|
||||||
write!(f, "test #{}: {}encountered a rust panic:\n{}", index + 1, format_test(test), error)
|
write!(f, "test #{}: {}encountered a rust panic:\n{}", index + 1, format_test(test), error)
|
||||||
|
Loading…
Reference in New Issue
Block a user