fix typos
This commit is contained in:
parent
37f52b7722
commit
992c9c29fb
7 changed files with 8 additions and 8 deletions
|
@ -102,7 +102,7 @@ Switching to `yaml-rust2` should be a very simple process. Change your `Cargo.to
|
|||
As for your code, you have one of two solutions:
|
||||
|
||||
* Changing your imports from `use yaml_rust::Yaml` to `use yaml_rust2::Yaml` if you import items directly, or change
|
||||
occurences of `yaml_rust` to `yaml_rust2` if you use fully qualified paths.
|
||||
occurrences of `yaml_rust` to `yaml_rust2` if you use fully qualified paths.
|
||||
* Alternatively, you can alias `yaml_rust2` with `use yaml_rust2 as yaml_rust`. This would keep your code working if
|
||||
you use fully qualified paths.
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ fn escape_str(wr: &mut dyn fmt::Write, v: &str) -> Result<(), fmt::Error> {
|
|||
}
|
||||
|
||||
impl<'a> YamlEmitter<'a> {
|
||||
/// Create a nwe emitter serializing into `writer`.
|
||||
/// Create a new emitter serializing into `writer`.
|
||||
pub fn new(writer: &'a mut dyn fmt::Write) -> YamlEmitter {
|
||||
YamlEmitter {
|
||||
writer,
|
||||
|
|
|
@ -61,7 +61,7 @@ pub enum Event {
|
|||
Scalar(String, TScalarStyle, usize, Option<Tag>),
|
||||
/// The start of a YAML sequence (array).
|
||||
SequenceStart(
|
||||
/// The anchor ID of the start of the squence.
|
||||
/// The anchor ID of the start of the sequence.
|
||||
usize,
|
||||
/// An optional tag
|
||||
Option<Tag>,
|
||||
|
|
|
@ -76,7 +76,7 @@ impl Marker {
|
|||
}
|
||||
}
|
||||
|
||||
/// An error that occured while scanning.
|
||||
/// An error that occurred while scanning.
|
||||
#[derive(Clone, PartialEq, Debug, Eq)]
|
||||
pub struct ScanError {
|
||||
/// The position at which the error happened in the source.
|
||||
|
@ -1912,7 +1912,7 @@ impl<T: Iterator<Item = char>> Scanner<T> {
|
|||
if (self.mark.col as isize) < self.indent {
|
||||
return Err(ScanError::new(
|
||||
start_mark,
|
||||
"invalid identation in quoted scalar",
|
||||
"invalid indentation in quoted scalar",
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ a4:
|
|||
#[test]
|
||||
fn test_emit_complex() {
|
||||
let s = r"
|
||||
cataloge:
|
||||
catalogue:
|
||||
product: &coffee { name: Coffee, price: 2.5 , unit: 1l }
|
||||
product: &cookies { name: Cookies!, price: 3.40 , unit: 400g}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ struct Generator {
|
|||
/// The RNG state.
|
||||
///
|
||||
/// We don't need to be cryptographically secure. [`SmallRng`] also implements the
|
||||
/// [`SeedableRng`] trait, allowing runs to be predictible.
|
||||
/// [`SeedableRng`] trait, allowing runs to be predictable.
|
||||
rng: SmallRng,
|
||||
/// The stack of indentations.
|
||||
indents: Vec<usize>,
|
||||
|
|
|
@ -26,7 +26,7 @@ struct Tree {
|
|||
/// The RNG state.
|
||||
///
|
||||
/// We don't need to be cryptographically secure. [`SmallRng`] also implements the
|
||||
/// [`SeedableRng`] trait, allowing runs to be predictible.
|
||||
/// [`SeedableRng`] trait, allowing runs to be predictable.
|
||||
rng: SmallRng,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue