Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed May 3, 2022
1 parent f560932 commit 479ecce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ cargo doc --document-private-items --no-deps --all-features

(cd comms && cargo check --no-default-features)
(cd log_types && cargo check --no-default-features)
(cd objectron && cargo check --no-default-features)
(cd viewer && cargo check --no-default-features)
(cd web_server && cargo check --no-default-features)

(cd comms && cargo check --all-features)
(cd log_types && cargo check --all-features)
(cd objectron && cargo check --all-features)
(cd viewer && cargo check --all-features)
(cd web_server && cargo check --all-features)

Expand Down
13 changes: 6 additions & 7 deletions objectron/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ fn main() {

tracing::debug!("Starting viewer…");
viewer::run_native_viewer(rerun_rx);
handle.join().ok();
}

#[cfg(feature = "web")]
#[tokio::main]
async fn main() {
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Log to stdout (if you run with `RUST_LOG=debug`).
tracing_subscriber::fmt::init();

Expand All @@ -63,9 +64,7 @@ async fn main() {

let pub_sub_url = comms::default_server_url();

let server = comms::Server::new(comms::DEFAULT_SERVER_PORT)
.await
.unwrap();
let server = comms::Server::new(comms::DEFAULT_SERVER_PORT).await?;
let server_handle = tokio::spawn(server.listen(rerun_rx));

let web_port = 9090;
Expand All @@ -82,8 +81,8 @@ async fn main() {
println!("Web server is running - view it at {}", viewer_url);
}

server_handle.await.unwrap().unwrap();
web_server_handle.await.unwrap();

server_handle.await??;
web_server_handle.await?;
handle.join().ok();
Ok(())
}

0 comments on commit 479ecce

Please sign in to comment.