Merge pull request #2395 from loloicci/improve-doc-error-exit

Improve the document of exit of parse::Errors
This commit is contained in:
Pavan Kumar Sunkara 2021-03-09 23:20:04 +05:30 committed by GitHub
commit 42c03775b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -436,7 +436,9 @@ impl Error {
)
}
/// Prints the error to `stderr` and exits with a status of `1`
/// Prints the error and exits. Depending on the error kind, this
/// either prints to `stderr` and exits with a status of `1`
/// or prints to `stdout` and exits with a status of `0`.
pub fn exit(&self) -> ! {
if self.use_stderr() {
self.message.print().expect("Error writing Error to stderr");