aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2019-06-03 15:13:19 +0100
committerAlan Du <[email protected]>2019-06-04 23:05:07 +0100
commit63e37f95366131359282186286664b7b70038844 (patch)
treef11c4a8bcdd029bb4efabd25cb6489d9fa968b13 /crates
parentb9af1d7c428bac3e2efb69e0dadda72938ce3b3c (diff)
Fix clippy::expect_fun_call
Diffstat (limited to 'crates')
-rw-r--r--crates/test_utils/src/lib.rs2
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.
319pub fn read_text(path: &Path) -> String { 319pub 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