Skip to content

Commit

Permalink
Merge pull request #23 from mkniewallner/docs/fix-example
Browse files Browse the repository at this point in the history
* mkniewallner/docs/fix-example:
  docs: fix example
  • Loading branch information
davvid committed Dec 10, 2024
2 parents c81784c + 5b041bb commit 791c51b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ high-level crate, providing quick-and-easy YAML importing, exporting and object
manipulation.

```rs
use saphyr::{YamlLoader, YamlEmitter};
use saphyr::{Yaml, YamlEmitter};

let docs = YamlLoader::load_from_str("[1, 2, 3]").unwrap();
let docs = Yaml::load_from_str("[1, 2, 3]").unwrap();
let doc = &docs[0]; // select the first YAML document
assert_eq!(doc[0].as_i64().unwrap(), 1); // access elements by index

Expand Down

0 comments on commit 791c51b

Please sign in to comment.