We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 93b703b + 6ff13e4 commit f8b409fCopy full SHA for f8b409f
src/lib.rs
@@ -434,7 +434,7 @@ fn find_str_lit_len(str_lit_to_eof: &str) -> Option<usize> {
434
impl ExpectFile {
435
/// Checks if file contents is equal to `actual`.
436
pub fn assert_eq(&self, actual: &str) {
437
- let expected = self.read();
+ let expected = self.data();
438
if actual == expected {
439
return;
440
}
@@ -445,7 +445,8 @@ impl ExpectFile {
445
let actual = format!("{:#?}\n", actual);
446
self.assert_eq(&actual)
447
448
- fn read(&self) -> String {
+ /// Returns the content of this expect.
449
+ pub fn data(&self) -> String {
450
fs::read_to_string(self.abs_path()).unwrap_or_default().replace("\r\n", "\n")
451
452
fn write(&self, contents: &str) {
0 commit comments