Skip to content

Commit

Permalink
State::export - avoid possible partial write()
Browse files Browse the repository at this point in the history
  • Loading branch information
orottier authored and benruijl committed Jun 5, 2024
1 parent 6fa3190 commit 09ed8ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ impl State {

for (s, n) in State::symbol_iter() {
dest.write_u32::<LittleEndian>(n.as_bytes().len() as u32)?;
dest.write(n.as_bytes())?;
dest.write_all(n.as_bytes())?;
dest.write_u8(s.get_wildcard_level())?;
dest.write_u8(s.is_symmetric() as u8)?;
dest.write_u8(s.is_antisymmetric() as u8)?;
Expand Down

0 comments on commit 09ed8ac

Please sign in to comment.