diff options
author | Corey Powell | 2021-06-02 18:14:19 +0000 |
---|---|---|
committer | GitHub | 2021-06-02 18:14:19 +0000 |
commit | 83031564dba3fa78d50b9ea4602e54aba82df763 (patch) | |
tree | 89a56c93fd1aa7f0c5588dde6b25f621ba7fc017 /helix-term | |
parent | 2719a35123e2b4000a0b2b863c929dd2824fff9a (diff) | |
parent | eab6e535117217ae640444c4b6b385f9541273a5 (diff) |
Merge pull request #57 from pickfire/fix-panic
Fix panic opening rust file
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/main.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs index 3a0f4d20..da03569d 100644 --- a/helix-term/src/main.rs +++ b/helix-term/src/main.rs @@ -51,7 +51,8 @@ pub struct Args { files: Vec<PathBuf>, } -fn main() -> Result<()> { +#[tokio::main] +async fn main() -> Result<()> { let help = format!( "\ {} {} @@ -113,13 +114,9 @@ FLAGS: let config = toml::from_slice(toml).context("Could not parse languages.toml")?; LOADER.get_or_init(|| Loader::new(config)); - let runtime = tokio::runtime::Runtime::new().context("unable to start tokio runtime")?; - // TODO: use the thread local executor to spawn the application task separately from the work pool let mut app = Application::new(args).context("unable to create new appliction")?; - runtime.block_on(async move { - app.run().await; - }); + app.run().await; Ok(()) } |