From 1354d931b21e033a971a6453ce9651ed223e15fd Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Wed, 3 Mar 2021 20:38:46 -0500 Subject: [PATCH] docs --- src/file.rs | 2 +- src/lib.rs | 4 +++- src/parser.rs | 8 +------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/file.rs b/src/file.rs index f1f73f3..9d893f0 100644 --- a/src/file.rs +++ b/src/file.rs @@ -122,7 +122,7 @@ impl MutableValue<'_, '_, '_> { } } -/// An imtermediate representation of a mutable multivar obtained from +/// An intermediate representation of a mutable multivar obtained from /// [`GitConfig`]. pub struct MutableMultiValue<'borrow, 'lookup, 'event> { section: &'borrow mut HashMap>>, diff --git a/src/lib.rs b/src/lib.rs index 1c62fef..3f61d77 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,9 @@ #![forbid(unsafe_code)] // #![deny(missing_docs)] #![warn(clippy::pedantic, clippy::nursery, clippy::cargo)] -#![allow(clippy::must_use_candidate, clippy::shadow_unrelated)] +#![allow( + // clippy::must_use_candidate, + clippy::shadow_unrelated)] //! # `git_config` //! diff --git a/src/parser.rs b/src/parser.rs index fbc8d16..18d65e9 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -96,13 +96,7 @@ impl Display for Event<'_> { impl Into> for Event<'_> { fn into(self) -> Vec { - match self { - Self::Value(e) | Self::ValueNotDone(e) | Self::ValueDone(e) => e.to_vec(), - Self::Comment(e) => e.into(), - Self::SectionHeader(e) => e.into(), - Self::Key(e) | Self::Newline(e) | Self::Whitespace(e) => e.as_bytes().to_vec(), - Self::KeyValueSeparator => vec![b'='], - } + (&self).into() } }