aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGravatar Dmitry Gavrovsky <dmitrygavrovsky@gmail.com> 2021-12-11 20:23:11 +0200
committerGravatar GitHub <noreply@github.com> 2021-12-11 10:23:11 -0800
commitf48378ec16af1035af32ed16592099104a552d90 (patch)
tree5407e21cb7e99d379c5c6f5474def43ad7e99388 /examples
parente28f581e1d91bbe40074c47a90b0bdf6528107c2 (diff)
downloadnotion-f48378ec16af1035af32ed16592099104a552d90.tar.gz
notion-f48378ec16af1035af32ed16592099104a552d90.tar.zst
notion-f48378ec16af1035af32ed16592099104a552d90.zip
fix(example): Example wasn't compling + lib fixes (#19)
* get page + query database bugfixes * fixed wrong error type * clap integration fix * comments cleaning * source formatting using cargo format
Diffstat (limited to 'examples')
-rw-r--r--examples/todo/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/todo/main.rs b/examples/todo/main.rs
index 3a01af3..0832f68 100644
--- a/examples/todo/main.rs
+++ b/examples/todo/main.rs
@@ -1,20 +1,20 @@
mod commands;
use anyhow::{Context, Result};
-use clap::Clap;
+use clap::Parser;
use notion::ids::DatabaseId;
use notion::NotionApi;
use serde::{Deserialize, Serialize};
// From <https://docs.rs/clap/3.0.0-beta.2/clap/>
-#[derive(Clap)]
+#[derive(Parser, Debug)]
#[clap(version = "1.0", author = "Jake Swenson")]
struct Opts {
#[clap(subcommand)]
command: SubCommand,
}
-#[derive(Clap)]
+#[derive(Parser, Debug)]
enum SubCommand {
/// Configure what database this notion-todo example uses
Config,