aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jake Swenson <jake@jakeswenson.com> 2021-05-15 10:30:35 -0700
committerGravatar Jake Swenson <jake@jakeswenson.com> 2021-05-15 10:30:35 -0700
commite0d25df23fac6e53c1a9962ecfdc730d762915bc (patch)
tree2908490908dd473239e1a0fbd0505f6635ab2ba3 /src
parenta5fccf17f6cf477426c17216b1bc7628e0434d79 (diff)
downloadnotion-e0d25df23fac6e53c1a9962ecfdc730d762915bc.tar.gz
notion-e0d25df23fac6e53c1a9962ecfdc730d762915bc.tar.zst
notion-e0d25df23fac6e53c1a9962ecfdc730d762915bc.zip
trait issue, need to fix
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 7c4e454..3438749 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -17,17 +17,6 @@ trait Identifiable {
fn id(&self) -> &Self::Type;
}
-impl<T, U> Identifiable for &U
-where
- U: Identifiable<Type = T>,
-{
- type Type = T;
-
- fn id(&self) -> &Self::Type {
- self.id()
- }
-}
-
struct NotionApi {
client: Client,
}
@@ -119,7 +108,7 @@ mod tests {
use crate::models::search::{
DatabaseQuery, FilterCondition, FilterProperty, FilterValue, NotionSearch, TextCondition,
};
- use crate::NotionApi;
+ use crate::{Identifiable, NotionApi};
const TEST_TOKEN: &'static str = include_str!(".api_token");
@@ -164,7 +153,8 @@ mod tests {
let db = response.results()[0].clone();
- let db_result = api.get_database(&db).await?;
+ // todo: fix this clone issue
+ let db_result = api.get_database(db.clone()).await?;
assert_eq!(db, db_result);