Skip to content

Commit 5c3d928

Browse files
committed
fix doc tests
1 parent 9e3cbf0 commit 5c3d928

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cot-macros/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,10 @@ pub fn derive_model_helper(_item: TokenStream) -> TokenStream {
222222
/// operators.
223223
///
224224
/// ```
225-
/// use cot::db::{model, query};
225+
/// use cot::db::{Database, model, query};
226226
///
227227
/// #[model]
228+
/// #[derive(Debug, Clone)]
228229
/// struct Customer {
229230
/// #[model(primary_key)]
230231
/// id: i32,
@@ -236,8 +237,8 @@ pub fn derive_model_helper(_item: TokenStream) -> TokenStream {
236237
/// is_active: bool
237238
/// }
238239
///
239-
/// # async fn run(db: Database) -> cot::Result<()> {
240-
/// let customer = query!(Customer, $id > 5 && $full_name == "Jon Doe").await?;
240+
/// # async fn run(db: Database) -> cot::Result<()> {
241+
/// let customer = query!(Customer, $id == 5).get(&db).await?;
241242
/// println!("Customer: {:?}", customer);
242243
/// # Ok(())
243244
/// # }

0 commit comments

Comments
 (0)