|
|
@ -22,7 +22,7 @@ pub enum Assoc {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ChangeSpec = Change | ChangeSet | Vec<Change>
|
|
|
|
// ChangeSpec = Change | ChangeSet | Vec<Change>
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
|
|
#[derive(Debug, Default, Clone, PartialEq, Eq)]
|
|
|
|
pub struct ChangeSet {
|
|
|
|
pub struct ChangeSet {
|
|
|
|
pub(crate) changes: Vec<Operation>,
|
|
|
|
pub(crate) changes: Vec<Operation>,
|
|
|
|
/// The required document length. Will refuse to apply changes unless it matches.
|
|
|
|
/// The required document length. Will refuse to apply changes unless it matches.
|
|
|
@ -30,16 +30,6 @@ pub struct ChangeSet {
|
|
|
|
len_after: usize,
|
|
|
|
len_after: usize,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
impl Default for ChangeSet {
|
|
|
|
|
|
|
|
fn default() -> Self {
|
|
|
|
|
|
|
|
Self {
|
|
|
|
|
|
|
|
changes: Vec::new(),
|
|
|
|
|
|
|
|
len: 0,
|
|
|
|
|
|
|
|
len_after: 0,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
impl ChangeSet {
|
|
|
|
impl ChangeSet {
|
|
|
|
pub fn with_capacity(capacity: usize) -> Self {
|
|
|
|
pub fn with_capacity(capacity: usize) -> Self {
|
|
|
|
Self {
|
|
|
|
Self {
|
|
|
|