readme: nit-picking

This commit is contained in:
Tshepang Lekhonkhobe 2017-06-26 12:32:52 +02:00
parent 666af4c7fa
commit 9687ac3cc3

View file

@ -7,12 +7,12 @@ The missing YAML 1.2 implementation for Rust.
[![license](https://img.shields.io/crates/l/yaml-rust.svg)](https://crates.io/crates/yaml-rust/) [![license](https://img.shields.io/crates/l/yaml-rust.svg)](https://crates.io/crates/yaml-rust/)
[![version](https://img.shields.io/crates/v/yaml-rust.svg)](https://crates.io/crates/yaml-rust/) [![version](https://img.shields.io/crates/v/yaml-rust.svg)](https://crates.io/crates/yaml-rust/)
`yaml-rust` is a pure Rust YAML 1.2 implementation without `yaml-rust` is a pure Rust YAML 1.2 implementation,
any external dependencies, which enjoys the memory safety which enjoys the memory safety
property and other benefits from the Rust language. property and other benefits from the Rust language.
The parser is heavily influenced by `libyaml` and `yaml-cpp`. The parser is heavily influenced by `libyaml` and `yaml-cpp`.
This crate works on all Rust supported platforms and This crate works on all Rust-supported platforms. It also works on
Rust 1.0.0 and nightly! Rust 1.0.0 and nightly!
See [Document](http://chyh1990.github.io/yaml-rust/doc/yaml_rust/) See [Document](http://chyh1990.github.io/yaml-rust/doc/yaml_rust/)
@ -28,7 +28,7 @@ Add the following to the Cargo.toml of your project:
```toml ```toml
[dependencies] [dependencies]
yaml-rust = "*" yaml-rust = "0.3"
``` ```
or or
@ -38,7 +38,7 @@ or
git = "https://github.com/chyh1990/yaml-rust.git" git = "https://github.com/chyh1990/yaml-rust.git"
``` ```
and import using *extern crate*: and import:
```rust ```rust
extern crate yaml_rust; extern crate yaml_rust;
@ -76,7 +76,7 @@ bar:
// Chained key/array access is checked and won't panic, // Chained key/array access is checked and won't panic,
// return BadValue if they are not exist. // return BadValue if they are not exist.
assert!(doc["INVALID_KEY"][100].is_badvalue()); assert!(doc["INVALID_KEY"][100].is_badvalue());
// Dump the YAML object // Dump the YAML object
let mut out_str = String::new(); let mut out_str = String::new();
{ {
@ -112,7 +112,7 @@ examples in the specification, except for the following known bugs:
* Empty plain scalar in certain contexts * Empty plain scalar in certain contexts
However, the widely used library `libyaml` also fails to parse these examples, However, the widely used library `libyaml` also fails to parse these examples,
so it may not be a huge problem for most users. so it may not be a huge problem for most users.
## Goals ## Goals
@ -136,4 +136,3 @@ Fork & PR on Github.
Unless you explicitly state otherwise, any contribution intentionally submitted Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions. additional terms or conditions.