From eb27634c349e024289ea7328b7aac6a25c673185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Tue, 5 Dec 2023 22:27:24 +0100 Subject: [PATCH] Switch examples to new macros --- examples/user-defined-type.rs | 6 +++--- examples/value_list.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/user-defined-type.rs b/examples/user-defined-type.rs index 53465b2f10..9eda06c798 100644 --- a/examples/user-defined-type.rs +++ b/examples/user-defined-type.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use scylla::macros::{FromUserType, IntoUserType}; -use scylla::{IntoTypedRows, Session, SessionBuilder}; +use scylla::macros::FromUserType; +use scylla::{IntoTypedRows, SerializeCql, Session, SessionBuilder}; use std::env; #[tokio::main] @@ -29,7 +29,7 @@ async fn main() -> Result<()> { // Define custom struct that matches User Defined Type created earlier // wrapping field in Option will gracefully handle null field values - #[derive(Debug, IntoUserType, FromUserType)] + #[derive(Debug, SerializeCql, FromUserType)] struct MyType { int_val: i32, text_val: Option, diff --git a/examples/value_list.rs b/examples/value_list.rs index 44b388dcbc..9606c4d5cb 100644 --- a/examples/value_list.rs +++ b/examples/value_list.rs @@ -19,7 +19,7 @@ async fn main() { .await .unwrap(); - #[derive(scylla::ValueList)] + #[derive(scylla::SerializeRow)] struct MyType<'a> { k: i32, my: Option<&'a str>, @@ -36,7 +36,7 @@ async fn main() { .unwrap(); // You can also use type generics: - #[derive(scylla::ValueList)] + #[derive(scylla::SerializeRow)] struct MyTypeWithGenerics { k: i32, my: Option,