diff options
author | 2021-05-15 10:30:35 -0700 | |
---|---|---|
committer | 2021-05-15 10:30:35 -0700 | |
commit | e0d25df23fac6e53c1a9962ecfdc730d762915bc (patch) | |
tree | 2908490908dd473239e1a0fbd0505f6635ab2ba3 /src | |
parent | a5fccf17f6cf477426c17216b1bc7628e0434d79 (diff) | |
download | notion-e0d25df23fac6e53c1a9962ecfdc730d762915bc.tar.gz notion-e0d25df23fac6e53c1a9962ecfdc730d762915bc.tar.zst notion-e0d25df23fac6e53c1a9962ecfdc730d762915bc.zip |
trait issue, need to fix
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -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); |