Have pretty
and show_backtrace
accept booleans
This commit is contained in:
parent
59df6c8eb9
commit
6a59d0e3aa
1 changed files with 5 additions and 5 deletions
|
@ -850,7 +850,7 @@ impl dyn Error + Send + Sync {
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
/// let error = SuperError { side: SuperErrorSideKick };
|
/// let error = SuperError { side: SuperErrorSideKick };
|
||||||
/// let report = Report::new(&error).pretty();
|
/// let report = Report::new(&error).pretty(true);
|
||||||
///
|
///
|
||||||
/// println!("{}", report);
|
/// println!("{}", report);
|
||||||
/// }
|
/// }
|
||||||
|
@ -874,15 +874,15 @@ where
|
||||||
|
|
||||||
/// Enable pretty-printing the report.
|
/// Enable pretty-printing the report.
|
||||||
#[unstable(feature = "error_reporter", issue = "90172")]
|
#[unstable(feature = "error_reporter", issue = "90172")]
|
||||||
pub fn pretty(mut self) -> Self {
|
pub fn pretty(mut self, pretty: bool) -> Self {
|
||||||
self.pretty = true;
|
self.pretty = pretty;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Enable showing a backtrace for the report.
|
/// Enable showing a backtrace for the report.
|
||||||
#[unstable(feature = "error_reporter", issue = "90172")]
|
#[unstable(feature = "error_reporter", issue = "90172")]
|
||||||
pub fn show_backtrace(mut self) -> Self {
|
pub fn show_backtrace(mut self, show_backtrace: bool) -> Self {
|
||||||
self.show_backtrace = true;
|
self.show_backtrace = show_backtrace;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue