diff options
| author | Philipp A | 2018-12-07 12:27:24 +0100 |
|---|---|---|
| committer | Philipp A | 2018-12-07 12:27:24 +0100 |
| commit | 8b0a484ec724dd232f26d3794b21271191a45fcf (patch) | |
| tree | 4091781d8b857263cbc07df0ae6ab13aa89dff6e | |
| parent | 067f15cddbcffda39eb90752fcefe6408f3f3909 (diff) | |
| download | rust-rst-8b0a484ec724dd232f26d3794b21271191a45fcf.tar.bz2 | |
a bit clippy
| -rw-r--r-- | src/document_tree/attribute_types.rs | 1 | ||||
| -rw-r--r-- | src/parser/conversion/block.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/document_tree/attribute_types.rs b/src/document_tree/attribute_types.rs index cd766f2..8f7dac5 100644 --- a/src/document_tree/attribute_types.rs +++ b/src/document_tree/attribute_types.rs @@ -76,6 +76,7 @@ impl FromStr for Measure { mod test { use super::*; + #[test] fn test_parse_measure() { let _a: Measure = "1.5em".parse().unwrap(); let _b: Measure = "20 mm".parse().unwrap(); diff --git a/src/parser/conversion/block.rs b/src/parser/conversion/block.rs index bca8559..280aff3 100644 --- a/src/parser/conversion/block.rs +++ b/src/parser/conversion/block.rs @@ -81,7 +81,7 @@ fn convert_substitution_def(pair: Pair<Rule>) -> Result<e::SubstitutionDefinitio Rule::image => convert_image::<e::ImageInline>(inner_pair)?.into(), rule => panic!("Unknown substitution rule {:?}", rule), }; - let mut subst_def = e::SubstitutionDefinition::with_children(vec![inner.into()]); + let mut subst_def = e::SubstitutionDefinition::with_children(vec![inner]); subst_def.names_mut().push(NameToken(name.to_owned())); Ok(subst_def) } |
