aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/compositor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/compositor.rs')
-rw-r--r--helix-term/src/compositor.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index e3cec643..1d421213 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -63,7 +63,7 @@ pub trait Component: Any + AnyComponent {
}
}
-use anyhow::Error;
+use anyhow::Context as AnyhowContext;
use std::io::stdout;
use tui::backend::{Backend, CrosstermBackend};
type Terminal = tui::terminal::Terminal<CrosstermBackend<std::io::Stdout>>;
@@ -76,9 +76,9 @@ pub struct Compositor {
}
impl Compositor {
- pub fn new() -> Result<Self, Error> {
+ pub fn new() -> anyhow::Result<Self> {
let backend = CrosstermBackend::new(stdout());
- let terminal = Terminal::new(backend)?;
+ let terminal = Terminal::new(backend).context("build terminal")?;
Ok(Self {
layers: Vec::new(),
terminal,