fix(handler): Apply MietteHandlerOpts::graphical_theme (#138)

Fixes: https://github.com/zkat/miette/issues/134
This commit is contained in:
Christopher Durham 2022-03-18 18:30:00 -05:00 committed by GitHub
parent b6a6cc9e75
commit 70e84f9a01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -167,10 +167,11 @@ impl MietteHandlerOpts {
} else {
ThemeStyles::none()
};
let theme = self.theme.unwrap_or(GraphicalTheme { characters, styles });
let mut handler = GraphicalReportHandler::new()
.with_width(width)
.with_links(linkify)
.with_theme(GraphicalTheme { characters, styles });
.with_theme(theme);
if let Some(footer) = self.footer {
handler = handler.with_footer(footer);
}