forked from rojo-rbx/rojo
Actually generate AppliedPatchSet objects (#250)
* Start actually computing AppliedPatchSet values * Improve patch_apply documentation and flesh out applied patch code * Add file link notes * Stub out where tests for snapshot subsystem will go * Create baseline tests * Fix build failure by silencing Clippy
This commit is contained in:
committed by
GitHub
parent
a70b7ee150
commit
e741f7b557
@@ -63,7 +63,7 @@ pub struct PatchUpdate {
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct AppliedPatchSet {
|
||||
pub removed: Vec<RbxId>,
|
||||
pub added: Vec<AppliedPatchAdd>,
|
||||
pub added: Vec<RbxId>,
|
||||
pub updated: Vec<AppliedPatchUpdate>,
|
||||
}
|
||||
|
||||
@@ -77,11 +77,6 @@ impl AppliedPatchSet {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct AppliedPatchAdd {
|
||||
pub instance_id: RbxId,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct AppliedPatchUpdate {
|
||||
pub id: RbxId,
|
||||
@@ -92,3 +87,15 @@ pub struct AppliedPatchUpdate {
|
||||
pub changed_properties: HashMap<String, Option<RbxValue>>,
|
||||
pub changed_metadata: Option<InstanceMetadata>,
|
||||
}
|
||||
|
||||
impl AppliedPatchUpdate {
|
||||
pub fn new(id: RbxId) -> Self {
|
||||
Self {
|
||||
id,
|
||||
changed_name: None,
|
||||
changed_class_name: None,
|
||||
changed_properties: HashMap::new(),
|
||||
changed_metadata: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user