diff options
author | Alan Du <[email protected]> | 2019-06-03 15:13:19 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2019-06-04 23:05:07 +0100 |
commit | 63e37f95366131359282186286664b7b70038844 (patch) | |
tree | f11c4a8bcdd029bb4efabd25cb6489d9fa968b13 /crates/test_utils/src | |
parent | b9af1d7c428bac3e2efb69e0dadda72938ce3b3c (diff) |
Fix clippy::expect_fun_call
Diffstat (limited to 'crates/test_utils/src')
-rw-r--r-- | crates/test_utils/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs index 7f55779cf..8bb3b3937 100644 --- a/crates/test_utils/src/lib.rs +++ b/crates/test_utils/src/lib.rs | |||
@@ -318,7 +318,7 @@ pub fn project_dir() -> PathBuf { | |||
318 | /// so this should always be correct. | 318 | /// so this should always be correct. |
319 | pub fn read_text(path: &Path) -> String { | 319 | pub fn read_text(path: &Path) -> String { |
320 | fs::read_to_string(path) | 320 | fs::read_to_string(path) |
321 | .expect(&format!("File at {:?} should be valid", path)) | 321 | .unwrap_or_else(|_| panic!("File at {:?} should be valid", path)) |
322 | .replace("\r\n", "\n") | 322 | .replace("\r\n", "\n") |
323 | } | 323 | } |
324 | 324 | ||