fix typos
This commit is contained in:
parent
a503c8534f
commit
2ff89a9e42
16 changed files with 39 additions and 38 deletions
|
|
@ -183,7 +183,7 @@ pub enum FromElementError {
|
|||
/// Contains the original `Element` unmodified.
|
||||
Mismatch(minidom::Element),
|
||||
|
||||
/// During processing of the element, an (unrecoverable) error occured.
|
||||
/// During processing of the element, an (unrecoverable) error occurred.
|
||||
Invalid(Error),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ Dynamic enum variants are completely independent of one another and thus use
|
|||
the same meta structure as structs. See [Struct meta](#struct-meta) for
|
||||
details.
|
||||
|
||||
The `builder`, `iterator` and `debug` keys cannot be used on dynmaic enum
|
||||
The `builder`, `iterator` and `debug` keys cannot be used on dynamic enum
|
||||
variants.
|
||||
|
||||
#### Example
|
||||
|
|
@ -527,7 +527,7 @@ in regard of the specific serialisation of a field: it is possible to exchange
|
|||
a nested child element for an attribute without changing the Rust interface
|
||||
of the struct.
|
||||
|
||||
On the other hand, `extract` meta declarations can quickly become unwieldly
|
||||
On the other hand, `extract` meta declarations can quickly become unwieldy
|
||||
and they may not support all configuration options which may in the future be
|
||||
added on structs (such as configuring handling of undeclared attributes) and
|
||||
they cannot be used for enumerations.
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn fallible_builder_missmatch_passthrough() {
|
||||
fn fallible_builder_mismatch_passthrough() {
|
||||
match Result::<AlwaysMismatch, Error>::from_events(qname(), attrs()) {
|
||||
Err(FromEventsError::Mismatch { .. }) => (),
|
||||
other => panic!("unexpected result: {:?}", other),
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ enum IntoEventsInner {
|
|||
/// End of iteration: this state generates an end-of-iterator state.
|
||||
///
|
||||
/// Note that the [`rxml::Event::EndElement`] event for the element itself
|
||||
/// is generated by the iterator alraedy in the `Nodes` state, when
|
||||
/// is generated by the iterator already in the `Nodes` state, when
|
||||
/// `nested` is None and `remaining` returns `None` from its `next()`
|
||||
/// implementation.
|
||||
Fin,
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ mod tests_minidom {
|
|||
assert_eq!(items.len(), 1);
|
||||
match items[0] {
|
||||
Item::XmlDeclaration(XmlVersion::V1_0) => (),
|
||||
ref other => panic!("unexected item in position 0: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 0: {:?}", other),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -327,15 +327,15 @@ mod tests_minidom {
|
|||
assert_eq!(&**ns, Namespace::none());
|
||||
assert_eq!(&**name, "elem");
|
||||
}
|
||||
ref other => panic!("unexected item in position 0: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 0: {:?}", other),
|
||||
};
|
||||
match items[1] {
|
||||
Item::ElementHeadEnd => (),
|
||||
ref other => panic!("unexected item in position 1: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 1: {:?}", other),
|
||||
};
|
||||
match items[2] {
|
||||
Item::ElementFoot => (),
|
||||
ref other => panic!("unexected item in position 2: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 2: {:?}", other),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ mod tests_minidom {
|
|||
assert_eq!(&**ns, Namespace::none());
|
||||
assert_eq!(&**name, "elem");
|
||||
}
|
||||
ref other => panic!("unexected item in position 0: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 0: {:?}", other),
|
||||
};
|
||||
match items[1] {
|
||||
Item::Attribute(ref ns, ref name, ref value) => {
|
||||
|
|
@ -370,15 +370,15 @@ mod tests_minidom {
|
|||
assert_eq!(&**name, "attr");
|
||||
assert_eq!(&**value, "value");
|
||||
}
|
||||
ref other => panic!("unexected item in position 1: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 1: {:?}", other),
|
||||
};
|
||||
match items[2] {
|
||||
Item::ElementHeadEnd => (),
|
||||
ref other => panic!("unexected item in position 2: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 2: {:?}", other),
|
||||
};
|
||||
match items[3] {
|
||||
Item::ElementFoot => (),
|
||||
ref other => panic!("unexected item in position 3: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 3: {:?}", other),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -400,21 +400,21 @@ mod tests_minidom {
|
|||
assert_eq!(&**ns, Namespace::none());
|
||||
assert_eq!(&**name, "elem");
|
||||
}
|
||||
ref other => panic!("unexected item in position 0: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 0: {:?}", other),
|
||||
};
|
||||
match items[1] {
|
||||
Item::ElementHeadEnd => (),
|
||||
ref other => panic!("unexected item in position 1: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 1: {:?}", other),
|
||||
};
|
||||
match items[2] {
|
||||
Item::Text(ref value) => {
|
||||
assert_eq!(value, "Hello World!");
|
||||
}
|
||||
ref other => panic!("unexected item in position 2: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 2: {:?}", other),
|
||||
};
|
||||
match items[3] {
|
||||
Item::ElementFoot => (),
|
||||
ref other => panic!("unexected item in position 3: {:?}", other),
|
||||
ref other => panic!("unexpected item in position 3: {:?}", other),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -446,7 +446,7 @@ mod tests {
|
|||
assert_eq!(events.len(), 1);
|
||||
match events[0] {
|
||||
Event::XmlDeclaration(_, XmlVersion::V1_0) => (),
|
||||
ref other => panic!("unexected event in position 0: {:?}", other),
|
||||
ref other => panic!("unexpected event in position 0: {:?}", other),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -465,11 +465,11 @@ mod tests {
|
|||
assert_eq!(ns, Namespace::none());
|
||||
assert_eq!(name, "elem");
|
||||
}
|
||||
ref other => panic!("unexected event in position 0: {:?}", other),
|
||||
ref other => panic!("unexpected event in position 0: {:?}", other),
|
||||
};
|
||||
match events[1] {
|
||||
Event::EndElement(_) => (),
|
||||
ref other => panic!("unexected event in position 1: {:?}", other),
|
||||
ref other => panic!("unexpected event in position 1: {:?}", other),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -487,11 +487,11 @@ mod tests {
|
|||
assert_eq!(ns, Namespace::none());
|
||||
assert_eq!(name, "elem");
|
||||
}
|
||||
ref other => panic!("unexected event in position 0: {:?}", other),
|
||||
ref other => panic!("unexpected event in position 0: {:?}", other),
|
||||
};
|
||||
match events[1] {
|
||||
Event::EndElement(_) => (),
|
||||
ref other => panic!("unexected event in position 1: {:?}", other),
|
||||
ref other => panic!("unexpected event in position 1: {:?}", other),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -511,17 +511,17 @@ mod tests {
|
|||
assert_eq!(ns, Namespace::none());
|
||||
assert_eq!(name, "elem");
|
||||
}
|
||||
ref other => panic!("unexected event in position 0: {:?}", other),
|
||||
ref other => panic!("unexpected event in position 0: {:?}", other),
|
||||
};
|
||||
match events[1] {
|
||||
Event::Text(_, ref value) => {
|
||||
assert_eq!(value, "Hello World!");
|
||||
}
|
||||
ref other => panic!("unexected event in position 1: {:?}", other),
|
||||
ref other => panic!("unexpected event in position 1: {:?}", other),
|
||||
};
|
||||
match events[2] {
|
||||
Event::EndElement(_) => (),
|
||||
ref other => panic!("unexected event in position 2: {:?}", other),
|
||||
ref other => panic!("unexpected event in position 2: {:?}", other),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -549,11 +549,11 @@ mod tests {
|
|||
Some("value")
|
||||
);
|
||||
}
|
||||
ref other => panic!("unexected event in position 0: {:?}", other),
|
||||
ref other => panic!("unexpected event in position 0: {:?}", other),
|
||||
};
|
||||
match events[1] {
|
||||
Event::EndElement(_) => (),
|
||||
ref other => panic!("unexected event in position 2: {:?}", other),
|
||||
ref other => panic!("unexpected event in position 2: {:?}", other),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ pub trait TextCodec<T> {
|
|||
/// content by stripping it.
|
||||
// NOTE: The bound on T is needed because any given type A may implement
|
||||
// TextCodec for any number of types. If we pass T down to the `Filtered`
|
||||
// struct, rustc can do type inferrence on which `TextCodec`
|
||||
// struct, rustc can do type inference on which `TextCodec`
|
||||
// implementation the `filtered` method is supposed to have been called
|
||||
// on.
|
||||
fn filtered<F: TextFilter>(self, filter: F) -> Filtered<F, Self, T>
|
||||
|
|
|
|||
Loading…
Reference in a new issue