From e0d25df23fac6e53c1a9962ecfdc730d762915bc Mon Sep 17 00:00:00 2001 From: Jake Swenson Date: Sat, 15 May 2021 10:30:35 -0700 Subject: trait issue, need to fix --- src/lib.rs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src') 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 Identifiable for &U -where - U: Identifiable, -{ - 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); -- cgit v1.2.3