Skip to content

Commit 3141401

Browse files
committed
Coverage improvements
1 parent 0449705 commit 3141401

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"miette",
1212
"rstest",
1313
"subrecord",
14-
"thiserror"
14+
"thiserror",
15+
],
16+
"coverage-gutters.coverageBaseDir": ".",
17+
"coverage-gutters.coverageFileNames": [
18+
"lcov.info"
1519
]
1620
}

.vscode/tasks.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
"isDefault": true
1919
},
2020
"label": "rust: cargo test with coverage"
21+
},
22+
{
23+
"label": "Watch coverage on open",
24+
"command": "${command:coverage-gutters.watchCoverageAndVisibleEditors}",
25+
"runOptions": {
26+
"runOn": "folderOpen"
27+
}
2128
}
2229
]
2330
}

errful/src/protocol.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! The reason for this is that the `provide` method cannot distinguish between
1616
//! multiple values of the same type, so it would be necessary to define wrapper
1717
//! types anyway (e.g. `struct Code(str)` – this is how an earlier version of this
18-
//! module worksed). However, once these are defined, we might as well just use
18+
//! module worked). However, once these are defined, we might as well just use
1919
//! a trait instead, since the wrapper types would have to be referenced directly anyway.
2020
//!
2121
//! The other thing that is difficult to do with the `provide` method is to provide
@@ -34,7 +34,7 @@
3434
use std::{
3535
backtrace::Backtrace,
3636
borrow::Cow,
37-
error::{request_ref, request_value, Error},
37+
error::{Error, request_ref, request_value},
3838
fmt::Display,
3939
process::ExitCode,
4040
};
@@ -167,10 +167,7 @@ impl<'a> Label<'a> {
167167
message: &'a dyn Error,
168168
span: Span<u8>,
169169
) -> Self {
170-
Label {
171-
message: LabelMessage::Error(message),
172-
span,
173-
}
170+
Label { message: LabelMessage::Error(message), span }
174171
}
175172

176173
pub fn new_literal(

0 commit comments

Comments
 (0)