Skip to content

Commit

Permalink
Merge pull request #59 from Yamato-Security/58-quick-xml-compile-error
Browse files Browse the repository at this point in the history
fix compiler error quick-xml
  • Loading branch information
YamatoSecurity authored Jul 2, 2024
2 parents 9aa3e14 + 7713731 commit 29f7248
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 49 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [0.8.9 - 2024-07-02]

Fixed a compiler error when using the latest `quick-xml`. (@hitenkoku)

## [0.8.8 - 2024-02-16]

Removed unused crates `serde` and `simplelog`.
Expand Down
88 changes: 44 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository = "https://github.com/Yamato-Security/hayabusa-evtx"
license = "MIT"
readme = "README.md"

version = "0.8.8"
version = "0.8.9"
authors = ["Omer Ben-Amram <[email protected]>, Yamato Security"]
edition = "2021"

Expand All @@ -18,7 +18,7 @@ crc32fast = "1.*"
chrono = { version = "0.4.*", features = ["serde"] }
encoding = "0.*"
byteorder = "1"
quick-xml = "0.*"
quick-xml = "*"
thiserror = "1"
log = { version = "0.*", features = ["release_max_level_debug"] }
winstructs = "0.*"
Expand Down
2 changes: 1 addition & 1 deletion src/json_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ mod tests {
/// Converts an XML string to JSON, panics in xml is invalid.
fn xml_to_json(xml: &str, settings: &ParserSettings) -> String {
let mut reader = Reader::from_str(xml);
reader.trim_text(true);
reader.config_mut().trim_text(true);

let mut output = JsonOutput::new(settings);
output.visit_start_of_stream().expect("Start of stream");
Expand Down
4 changes: 2 additions & 2 deletions src/xml_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use log::trace;
use std::io::Write;

use quick_xml::events::attributes::Attribute;
use quick_xml::events::{BytesDecl, BytesEnd, BytesStart, BytesText, Event};
use quick_xml::events::{BytesDecl, BytesEnd, BytesPI, BytesStart, BytesText, Event};
use quick_xml::Writer;

use crate::binxml::name::BinXmlName;
Expand Down Expand Up @@ -142,7 +142,7 @@ impl<W: Write> BinXmlOutput for XmlOutput<W> {
// PITARGET - Emit the text "<?", the text (as specified by the Name rule in 2.2.12), and then the space character " ".
// Emit the text (as specified by the NullTerminatedUnicodeString rule in 2.2.12), and then the text "?>".
let concat = pi.name.as_str().to_owned() + pi.data.as_ref(); // only `String` supports concatenation.
let event = Event::PI(BytesText::new(concat.as_str()));
let event = Event::PI(BytesPI::new(concat.as_str()));
self.writer.write_event(event)?;

Ok(())
Expand Down

0 comments on commit 29f7248

Please sign in to comment.