summaryrefslogtreecommitdiffstats
path: root/front_end
diff options
context:
space:
mode:
authorKornel <kornel@geekhood.net>2020-02-23 17:21:02 +0000
committerKornel <kornel@geekhood.net>2020-02-23 17:21:02 +0000
commit5511e2f757c527de0fd9fd8dfa65b430b9fd5788 (patch)
treee89c23f6df77c8ceb32d20da61119f50b890a4e8 /front_end
parentb41bee32421c663056885866b544bca510393a11 (diff)
Battling runtimes
Diffstat (limited to 'front_end')
-rw-r--r--front_end/src/bin/crate_pages.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/front_end/src/bin/crate_pages.rs b/front_end/src/bin/crate_pages.rs
index c15d7a3..cdbfa78 100644
--- a/front_end/src/bin/crate_pages.rs
+++ b/front_end/src/bin/crate_pages.rs
@@ -11,7 +11,8 @@ use std::sync::Arc;
#[tokio::main]
async fn main() {
- if let Err(e) = run(std::env::args().nth(1)).await {
+ let handle = tokio::runtime::Handle::current();
+ if let Err(e) = handle.spawn(run(std::env::args().nth(1))).await.unwrap() {
eprintln!("error: {}", e);
for c in e.iter_chain() {
eprintln!("error: -- {}", c);
@@ -60,7 +61,6 @@ async fn render(origin: &Origin, crates: &KitchenSink, path: &PathBuf, markup: &
async fn run(filter: Option<String>) -> Result<(), failure::Error> {
let crates = Arc::new(kitchen_sink::KitchenSink::new_default().await?);
- crates.prewarm();
let image_filter = Arc::new(ImageOptimAPIFilter::new("czjpqfbdkz", crates.main_cache_dir().join("images.db")).await?);
let markup = &Renderer::new_filter(Some(Highlighter::new()), image_filter);