7218: Fix typos r=Veykril a=regexident

Apart from the very last commit on this PR (which fixes a public type's name) all changes are non-breaking.

Co-authored-by: Vincent Esche <regexident@gmail.com>
This commit is contained in:
bors[bot]
2021-01-10 18:16:29 +00:00
committed by GitHub
32 changed files with 114 additions and 118 deletions

View File

@@ -130,7 +130,7 @@ pub(crate) fn apply_document_changes(
}
/// Checks that the edits inside the completion and the additional edits do not overlap.
/// LSP explicitly forbits the additional edits to overlap both with the main edit and themselves.
/// LSP explicitly forbids the additional edits to overlap both with the main edit and themselves.
pub(crate) fn all_edits_are_disjoint(
completion: &lsp_types::CompletionItem,
additional_edits: &[lsp_types::TextEdit],
@@ -290,7 +290,7 @@ mod tests {
Some(vec![disjoint_edit.clone(), joint_edit.clone()]);
assert!(
!all_edits_are_disjoint(&completion_with_joint_edits, &[]),
"Completion with disjoint edits fails the validaton even with empty extra edits"
"Completion with disjoint edits fails the validation even with empty extra edits"
);
completion_with_joint_edits.text_edit =
@@ -298,7 +298,7 @@ mod tests {
completion_with_joint_edits.additional_text_edits = Some(vec![joint_edit.clone()]);
assert!(
!all_edits_are_disjoint(&completion_with_joint_edits, &[]),
"Completion with disjoint edits fails the validaton even with empty extra edits"
"Completion with disjoint edits fails the validation even with empty extra edits"
);
completion_with_joint_edits.text_edit =
@@ -310,7 +310,7 @@ mod tests {
completion_with_joint_edits.additional_text_edits = None;
assert!(
!all_edits_are_disjoint(&completion_with_joint_edits, &[]),
"Completion with disjoint edits fails the validaton even with empty extra edits"
"Completion with disjoint edits fails the validation even with empty extra edits"
);
completion_with_joint_edits.text_edit =
@@ -322,7 +322,7 @@ mod tests {
completion_with_joint_edits.additional_text_edits = Some(vec![joint_edit]);
assert!(
!all_edits_are_disjoint(&completion_with_joint_edits, &[]),
"Completion with disjoint edits fails the validaton even with empty extra edits"
"Completion with disjoint edits fails the validation even with empty extra edits"
);
}

View File

@@ -106,7 +106,7 @@ mod tests {
#[test]
fn test_format_docs_preserves_newlines() {
let comment = "this\nis\nultiline";
let comment = "this\nis\nmultiline";
assert_eq!(format_docs(comment), comment);
}