aboutsummaryrefslogtreecommitdiff
path: root/src/output.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/output.rs')
-rw-r--r--src/output.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/output.rs b/src/output.rs
index 8d71909..c00d4bb 100644
--- a/src/output.rs
+++ b/src/output.rs
@@ -3,8 +3,9 @@ use super::{
api,
bt::{BuildTemplate, Traitline},
};
-use std::{error::Error, io, io::Write};
+use std::{io, io::Write};
use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor};
+use anyhow::Error;
const HEADER_COLOR: Color = Color::Cyan;
@@ -67,7 +68,7 @@ pub fn show_build_template(build: &BuildTemplate) -> io::Result<()> {
/// Show an error to the standard error stream.
///
/// This will also show the chain of errors that lead up to this error, if available.
-pub fn show_error<E: Error + ?Sized>(error: &E) -> io::Result<()> {
+pub fn show_error(error: Error) -> io::Result<()> {
let mut error_color = ColorSpec::new();
error_color.set_fg(Some(Color::Red));
let mut stderr = StandardStream::stderr(ColorChoice::Auto);