Skip to content
This repository was archived by the owner on Jul 16, 2022. It is now read-only.

Commit 07cf482

Browse files
committed
Use single-threaded runtime
1 parent d2e39f9 commit 07cf482

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/bin/gist.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,18 @@ struct Delete {
117117
id: Vec<String>,
118118
}
119119

120-
#[tokio::main]
121-
async fn main() {
120+
fn main() {
122121
let args = Args::from_args();
123122

124-
if let Err(e) = run(args).await {
123+
let mut rt = tokio::runtime::Builder::new()
124+
.basic_scheduler()
125+
.enable_all()
126+
.build()
127+
.unwrap();
128+
129+
if let Err(e) = rt.block_on(run(args)) {
125130
eprintln!("{}", e);
126-
std::process::exit(1);
131+
std::process::exit(3);
127132
}
128133
}
129134

0 commit comments

Comments
 (0)