From 04f185586be0471feba93ed51dad32d3c2a50f36 Mon Sep 17 00:00:00 2001 From: Kenneth Loeffler Date: Wed, 13 Dec 2023 12:34:04 -0800 Subject: [PATCH] Use in-progress db for rbx_reflector default place decode (#378) Closes #345 Because of #375, it's possible to continue using `DecodePropertyBehavior::IgnoreUnknown` and simply swap to the in-progress database via `DecodeOptions::reflection_database` --- rbx_reflector/src/defaults.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rbx_reflector/src/defaults.rs b/rbx_reflector/src/defaults.rs index 06568cfe..f6297602 100644 --- a/rbx_reflector/src/defaults.rs +++ b/rbx_reflector/src/defaults.rs @@ -18,7 +18,8 @@ pub fn apply_defaults( let file = BufReader::new(File::open(defaults_place).context("Could not find defaults place")?); let decode_options = rbx_xml::DecodeOptions::new() - .property_behavior(rbx_xml::DecodePropertyBehavior::IgnoreUnknown); + .property_behavior(rbx_xml::DecodePropertyBehavior::IgnoreUnknown) + .reflection_database(database); let tree = rbx_xml::from_reader(file, decode_options).context("Could not decode defaults place")?;