Skip to content

Commit

Permalink
Use in-progress db for rbx_reflector default place decode (#378)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
kennethloeffler authored Dec 13, 2023
1 parent e9732e4 commit 04f1855
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rbx_reflector/src/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")?;
Expand Down

0 comments on commit 04f1855

Please sign in to comment.