Skip to content

Commit a469d2b

Browse files
committed
fix: Skip file write message since output is right there
1 parent c9158e5 commit a469d2b

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

src/panic.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,16 @@ fn write_msg<P: AsRef<Path>>(
113113
"{name} had a problem and crashed. To help us diagnose the \
114114
problem you can send us a crash report.\n"
115115
)?;
116-
writeln!(
117-
buffer,
118-
"We have generated a report file at \"{}\". Submit an \
116+
if let Some(file_path) = file_path {
117+
writeln!(
118+
buffer,
119+
"We have generated a report file at \"{}\". Submit an \
119120
issue or email with the subject of \"{} Crash Report\" and include the \
120121
report as an attachment.\n",
121-
match file_path {
122-
Some(fp) => format!("{}", fp.as_ref().display()),
123-
None => "<Failed to store file to disk>".to_owned(),
124-
},
125-
name
126-
)?;
122+
file_path.as_ref().display(),
123+
name
124+
)?;
125+
}
127126

128127
if let Some(homepage) = homepage {
129128
writeln!(buffer, "- Homepage: {homepage}")?;

tests/single-panic/tests/integration.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ Well, this is embarrassing.
142142
143143
single-panic-test had a problem and crashed. To help us diagnose the problem you can send us a crash report.
144144
145-
We have generated a report file at "<Failed to store file to disk>". Submit an issue or email with the subject of "single-panic-test Crash Report" and include the report as an attachment.
146-
147145
- Authors: Human Panic Authors <human-panic-crate@example.com>
148146
149147
We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.

0 commit comments

Comments
 (0)