Reorganize taskchampion crate for docs and tests
The public API of the taskchampion crate now contains the expected parts and no more, and has some better documentation. This moves the crate's external `tests/` into internal tests, as the TaskDB is no longer exposed as part of the crate API.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use clap::{App, Arg, SubCommand};
|
||||
use std::path::Path;
|
||||
use taskchampion::{taskstorage, Replica, Status, DB};
|
||||
use taskchampion::{taskstorage, Replica, Status};
|
||||
use uuid::Uuid;
|
||||
|
||||
fn main() {
|
||||
@@ -20,12 +20,9 @@ fn main() {
|
||||
.subcommand(SubCommand::with_name("gc").about("run garbage collection"))
|
||||
.get_matches();
|
||||
|
||||
let mut replica = Replica::new(
|
||||
DB::new(Box::new(
|
||||
taskstorage::KVStorage::new(Path::new("/tmp/tasks")).unwrap(),
|
||||
))
|
||||
.into(),
|
||||
);
|
||||
let mut replica = Replica::new(Box::new(
|
||||
taskstorage::KVStorage::new(Path::new("/tmp/tasks")).unwrap(),
|
||||
));
|
||||
|
||||
match matches.subcommand() {
|
||||
("add", Some(matches)) => {
|
||||
|
||||
Reference in New Issue
Block a user