java-properties icon indicating copy to clipboard operation
java-properties copied to clipboard

Update README example code

Open ryanhatfield opened this issue 1 year ago • 0 comments

When opening this library in crates.io and then github, I found the README a bit cryptic, it left out actual usage of this crate.

This PR updates the example code to be fully valid rust code.

This can be tested by running cargo new test-crate and adding the contents of the README example to the main.rs file.

Changes to example code:

  • #![allow(unused)] to hide warnings
  • add dependencies used
  • wrap in main function
  • include same code as library example
  • order operations to read/write simple then advanced
  • output test file to validate results

ryanhatfield avatar Apr 13 '23 13:04 ryanhatfield