switch to simpler single threaded tokio runtime
Less dependencies, yay
This commit is contained in:
parent
3818e91ef8
commit
2ad13d3d81
3 changed files with 12 additions and 91 deletions
13
src/main.rs
13
src/main.rs
|
|
@ -5,8 +5,7 @@ use rspotify::{prelude::*, scopes, AuthCodeSpotify, Credentials, OAuth};
|
|||
const SPOTIFY_WEB_API_ADD_PLAYLIST_MAX_ID_NUM: usize = 100;
|
||||
const SPOTIFY_WEB_API_TRACK_FEATURES_MAX_ID_NUM: usize = 100;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
async fn build_new_playlist() {
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
if args.len() != 4 {
|
||||
eprintln!("usage: {} PLAYLIST_TITLE MIN_TEMPO MAX_TEMPO", args[0]);
|
||||
|
|
@ -90,3 +89,13 @@ async fn main() {
|
|||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
tokio::runtime::Builder::new_current_thread()
|
||||
.enable_all()
|
||||
.build()
|
||||
.unwrap()
|
||||
.block_on({
|
||||
build_new_playlist()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue