mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Use upstream cov-mark
This commit is contained in:
parent
c5189a22cc
commit
fc9eed4836
101 changed files with 354 additions and 514 deletions
|
@ -13,7 +13,6 @@ use syntax::{
|
|||
},
|
||||
AstToken, InsertPosition, NodeOrToken, SyntaxElement, SyntaxNode, SyntaxToken,
|
||||
};
|
||||
use test_utils::mark;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct InsertUseConfig {
|
||||
|
@ -138,7 +137,7 @@ pub fn insert_use<'a>(
|
|||
|
||||
if add_blank.has_before() {
|
||||
if let Some(indent) = indent.clone() {
|
||||
mark::hit!(insert_use_indent_before);
|
||||
cov_mark::hit!(insert_use_indent_before);
|
||||
buf.push(indent);
|
||||
}
|
||||
}
|
||||
|
@ -156,11 +155,11 @@ pub fn insert_use<'a>(
|
|||
// only add indentation *after* our stuff if there's another node directly after it
|
||||
if add_blank.has_after() && matches!(insert_position, InsertPosition::Before(_)) {
|
||||
if let Some(indent) = indent {
|
||||
mark::hit!(insert_use_indent_after);
|
||||
cov_mark::hit!(insert_use_indent_after);
|
||||
buf.push(indent);
|
||||
}
|
||||
} else if add_blank.has_after() && matches!(insert_position, InsertPosition::After(_)) {
|
||||
mark::hit!(insert_use_no_indent_after);
|
||||
cov_mark::hit!(insert_use_no_indent_after);
|
||||
}
|
||||
|
||||
buf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue