diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 11:18:56 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 11:18:56 +0000 |
commit | f6f2e89e7ac9c4afbda11bade21f902c552fbba2 (patch) | |
tree | 07e0ffe10b57fe55f6586707ae1776d47b77f6e0 /crates/test_utils/src/lib.rs | |
parent | e8e82ce032f8678929b015e6f70ac060bb2cf94c (diff) | |
parent | d79a9b17dc4fb132443aa4ec1ca0ab278d2a217c (diff) |
Merge #546
546: replace `assert_dbg_eq` with Insta r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/test_utils/src/lib.rs')
-rw-r--r-- | crates/test_utils/src/lib.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs index 9b1c9c9a0..6489033dd 100644 --- a/crates/test_utils/src/lib.rs +++ b/crates/test_utils/src/lib.rs | |||
@@ -1,8 +1,6 @@ | |||
1 | use std::fmt; | ||
2 | use std::fs; | 1 | use std::fs; |
3 | use std::path::{Path, PathBuf}; | 2 | use std::path::{Path, PathBuf}; |
4 | 3 | ||
5 | use itertools::Itertools; | ||
6 | use text_unit::{TextRange, TextUnit}; | 4 | use text_unit::{TextRange, TextUnit}; |
7 | use serde_json::Value; | 5 | use serde_json::Value; |
8 | 6 | ||
@@ -31,12 +29,6 @@ macro_rules! assert_eq_text { | |||
31 | }}; | 29 | }}; |
32 | } | 30 | } |
33 | 31 | ||
34 | pub fn assert_eq_dbg(expected: &str, actual: &impl fmt::Debug) { | ||
35 | let actual = format!("{:?}", actual); | ||
36 | let expected = expected.lines().map(|l| l.trim()).join(" "); | ||
37 | assert_eq!(expected, actual); | ||
38 | } | ||
39 | |||
40 | pub fn extract_offset(text: &str) -> (TextUnit, String) { | 32 | pub fn extract_offset(text: &str) -> (TextUnit, String) { |
41 | match try_extract_offset(text) { | 33 | match try_extract_offset(text) { |
42 | None => panic!("text should contain cursor marker"), | 34 | None => panic!("text should contain cursor marker"), |