Getting rid of "Debug" derived implementation in the macro
This commit is contained in:
@@ -109,13 +109,13 @@ pub fn derive_json_crdt(input: OgTokenStream) -> OgTokenStream {
|
||||
}
|
||||
}
|
||||
|
||||
impl #impl_generics std::fmt::Debug for #ident #ty_generics #where_clause {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let mut fields = Vec::new();
|
||||
#(fields.push(format!("{}", #ident_strings.to_string()));)*
|
||||
write!(f, "{{ {:?} }}", fields.join(", "))
|
||||
}
|
||||
}
|
||||
// impl #impl_generics std::fmt::Debug for #ident #ty_generics #where_clause {
|
||||
// fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
// let mut fields = Vec::new();
|
||||
// #(fields.push(format!("{}", #ident_strings.to_string()));)*
|
||||
// write!(f, "{{ {:?} }}", fields.join(", "))
|
||||
// }
|
||||
// }
|
||||
|
||||
impl #impl_generics #crate_name::json_crdt::CrdtNode for #ident #ty_generics #where_clause {
|
||||
fn apply(&mut self, op: #crate_name::op::Op<#crate_name::json_crdt::JsonValue>) -> #crate_name::json_crdt::OpState {
|
||||
|
||||
@@ -9,7 +9,7 @@ pub mod keys;
|
||||
pub mod websocket;
|
||||
|
||||
#[add_crdt_fields]
|
||||
#[derive(Clone, CrdtNode, Serialize, Deserialize)]
|
||||
#[derive(Clone, CrdtNode, Serialize, Deserialize, Debug)]
|
||||
pub struct TransactionList {
|
||||
pub list: ListCrdt<Transaction>,
|
||||
}
|
||||
@@ -22,7 +22,7 @@ impl TransactionList {
|
||||
|
||||
/// A fake Transaction struct we can use as a simulated payload
|
||||
#[add_crdt_fields]
|
||||
#[derive(Clone, CrdtNode, Serialize, Deserialize, PartialEq)]
|
||||
#[derive(Clone, CrdtNode, Serialize, Deserialize, PartialEq, Debug)]
|
||||
pub struct Transaction {
|
||||
from: String,
|
||||
to: String,
|
||||
|
||||
Reference in New Issue
Block a user