This commit is contained in:
Edward Shen 2021-03-03 20:38:46 -05:00
parent 6ce2c1d89d
commit 1354d931b2
Signed by: edward
GPG key ID: 19182661E818369F
3 changed files with 5 additions and 9 deletions

View file

@ -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<SectionId, Vec<Event<'event>>>,

View file

@ -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`
//!

View file

@ -96,13 +96,7 @@ impl Display for Event<'_> {
impl Into<Vec<u8>> for Event<'_> {
fn into(self) -> Vec<u8> {
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()
}
}