diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/todo/commands/configure.rs | 9 | ||||
-rw-r--r-- | examples/todo/main.rs | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/examples/todo/commands/configure.rs b/examples/todo/commands/configure.rs index 42ffafd..18ace89 100644 --- a/examples/todo/commands/configure.rs +++ b/examples/todo/commands/configure.rs @@ -1,8 +1,9 @@ use crate::TodoConfig; use anyhow::Result; +use notion::ids::{AsIdentifier, DatabaseId}; use notion::models::search::NotionSearch; -use notion::models::{Database, DatabaseId}; -use notion::{AsIdentifier, NotionApi}; +use notion::models::Database; +use notion::NotionApi; use skim::{Skim, SkimItem, SkimItemReceiver, SkimItemSender, SkimOptions}; use std::borrow::Cow; use std::ops::Deref; @@ -43,9 +44,9 @@ fn skim_select_database(databases: Vec<Database>) -> Result<DatabaseId> { .downcast_ref() .expect("Couldn't cast back to SkimDB"); - let database_id = db.db.id(); + let database_id = db.db.as_id(); - Ok(database_id) + Ok(database_id.clone()) } pub async fn configure(notion_api: NotionApi) -> Result<()> { diff --git a/examples/todo/main.rs b/examples/todo/main.rs index 2283549..3a01af3 100644 --- a/examples/todo/main.rs +++ b/examples/todo/main.rs @@ -2,13 +2,13 @@ mod commands; use anyhow::{Context, Result}; use clap::Clap; -use notion::models::DatabaseId; +use notion::ids::DatabaseId; use notion::NotionApi; use serde::{Deserialize, Serialize}; -// https://docs.rs/clap/3.0.0-beta.2/clap/ +// From <https://docs.rs/clap/3.0.0-beta.2/clap/> #[derive(Clap)] -#[clap(version = "1.0", author = "Kevin K. <kbknapp@gmail.com>")] +#[clap(version = "1.0", author = "Jake Swenson")] struct Opts { #[clap(subcommand)] command: SubCommand, |