From b7006b8878c2d764a37ab372f9d5f3e0aba0d53f Mon Sep 17 00:00:00 2001 From: Danny Browning Date: Wed, 14 Feb 2024 08:24:11 -0700 Subject: [PATCH] chore: fmt --- src/api.rs | 5 ++++- src/lib.rs | 21 ++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/api.rs b/src/api.rs index cacd5b4..7dcb983 100644 --- a/src/api.rs +++ b/src/api.rs @@ -1,5 +1,8 @@ use crate::query::FilterQuery; -use ceramic_event::{Base64String, Base64UrlString, Jws, MultiBase32String, MultiBase36String, StreamId, StreamIdType}; +use ceramic_event::{ + Base64String, Base64UrlString, Jws, MultiBase32String, MultiBase36String, StreamId, + StreamIdType, +}; use serde::{Deserialize, Serialize}; use serde_json::Value; diff --git a/src/lib.rs b/src/lib.rs index 3c8f98a..68a3008 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,17 +8,20 @@ pub mod api; mod model_definition; mod query; -use ceramic_event::{Base64String, Cid, DeterministicInitEvent, EventArgs, Jws, MultiBase36String, Signer, StreamId, StreamIdType}; +use ceramic_event::{ + Base64String, Cid, DeterministicInitEvent, EventArgs, Jws, MultiBase36String, Signer, StreamId, + StreamIdType, +}; use serde::Serialize; use std::str::FromStr; use crate::api::ModelData; pub use ceramic_event; +pub use json_patch; pub use model_definition::{ GetRootSchema, ModelAccountRelation, ModelDefinition, ModelRelationDefinition, ModelViewDefinition, }; -pub use json_patch; pub use query::*; pub use schemars; @@ -923,12 +926,20 @@ pub mod tests { let post_resp = ceramic.update(&model, &stream_id, patch).await.unwrap(); assert_eq!(post_resp.stream_id, stream_id); let post_resp: Ball = serde_json::from_value(post_resp.state.unwrap().content).unwrap(); - assert_eq!(post_resp.red, replace_value, "Failed to return expected value on iteration {}", i); + assert_eq!( + post_resp.red, replace_value, + "Failed to return expected value on iteration {}", + i + ); let get_resp: Ball = ceramic.get_as(&stream_id).await.unwrap(); assert_eq!(get_resp.red, replace_value); assert_eq!(get_resp.blue, 4); - assert_eq!(get_resp, post_resp, "Failed to retrieve expected value on iteration {}", i); + assert_eq!( + get_resp, post_resp, + "Failed to retrieve expected value on iteration {}", + i + ); } } -} \ No newline at end of file +}