From 8edf20bcd0f10f29501285a2a0465dab5a46fbeb Mon Sep 17 00:00:00 2001 From: asonix Date: Wed, 18 Mar 2020 20:23:45 -0500 Subject: [PATCH] Update basic example to use Ext --- examples/basic.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/basic.rs b/examples/basic.rs index 310fe60..f06d2cd 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -1,7 +1,10 @@ -use activitystreams::object::Video; +use activitystreams::{ + ext::Ext, + object::{properties::ApObjectProperties, Video}, +}; fn main() -> Result<(), Box> { - let mut v = Video::default(); + let mut v = Video::full(); v.as_mut() .set_context_xsd_any_uri("https://www.w3.org/ns/activitystreams")? @@ -18,7 +21,7 @@ fn main() -> Result<(), Box> { println!("json, {}", s); - let v: Video = serde_json::from_str(&s)?; + let v: Ext = serde_json::from_str(&s)?; println!("Video again, {:#?}", v);