Prevent eager snapshot mutations from being clobbered by background updates

Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-05-04 15:10:39 -07:00
parent 821dff0e2d
commit a2c22a5e43
5 changed files with 96 additions and 58 deletions

View file

@ -6,13 +6,14 @@ use prost::Message as _;
use serde::Serialize;
use std::any::{Any, TypeId};
use std::{
fmt::Debug,
io,
time::{Duration, SystemTime, UNIX_EPOCH},
};
include!(concat!(env!("OUT_DIR"), "/zed.messages.rs"));
pub trait EnvelopedMessage: Clone + Serialize + Sized + Send + Sync + 'static {
pub trait EnvelopedMessage: Clone + Debug + Serialize + Sized + Send + Sync + 'static {
const NAME: &'static str;
const PRIORITY: MessagePriority;
fn into_envelope(