mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: impl view data processor
This commit is contained in:
@ -521,7 +521,7 @@ impl<T> Delta<T>
|
||||
where
|
||||
T: Attributes + serde::Serialize,
|
||||
{
|
||||
pub fn to_delta_json(&self) -> String {
|
||||
pub fn to_delta_str(&self) -> String {
|
||||
serde_json::to_string(self).unwrap_or_else(|_| "".to_owned())
|
||||
}
|
||||
|
||||
@ -530,7 +530,7 @@ where
|
||||
}
|
||||
|
||||
pub fn to_bytes(&self) -> Bytes {
|
||||
let json = self.to_delta_json();
|
||||
let json = self.to_delta_str();
|
||||
Bytes::from(json.into_bytes())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user