Move CLI crate to root of workspace

Somehow I missed that this was a thing you could do? It's a much
cleaner organization, and it makes it so that you don't have to
explicitly specify the crate to build.
This commit is contained in:
Kiana Sheibani 2023-09-23 03:01:36 -04:00
parent 2c6587aca1
commit dd4f0838ab
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
14 changed files with 75 additions and 83 deletions

35
src/main.rs Normal file
View file

@ -0,0 +1,35 @@
#![feature(iterator_try_collect)]
use std::io::{self, Write};
mod queries;
use queries::*;
mod datasets;
use datasets::*;
fn main() {
let mut config_dir = dirs::config_dir().unwrap();
config_dir.push("ggelo");
let path = dataset_path(&config_dir, "test");
let connection = open_dataset(&path).unwrap();
let set_data = SetData {
teams: vec![
vec![PlayerData {
id: PlayerId(1),
name: Some("player1".to_owned()),
prefix: None,
}],
vec![PlayerData {
id: PlayerId(2),
name: Some("player2".to_owned()),
prefix: None,
}],
],
winner: 0,
};
update_from_set(&connection, set_data.clone()).unwrap();
println!("{:?}", get_ratings(&connection, &set_data.teams).unwrap());
}