Unified · Split
| @@ -53,6 +53,7 @@ impl<'a> State<'a> { · 52 unmodified lines | |||
| 53 | /// Returns an error if the string provided is not a valid `git-config`. | 53 | /// Returns an error if the string provided is not a valid `git-config`. |
| 54 | /// This generally is due to either invalid names or if there's extraneous | 54 | /// This generally is due to either invalid names or if there's extraneous |
| 55 | /// data succeeding valid `git-config` data. | 55 | /// data succeeding valid `git-config` data. |
| 56 | #[allow(clippy::should_implement_trait)] | ||
| 56 | pub fn from_str(input: &'a str) -> Result<State<'a>, Error<'a>> { | 57 | pub fn from_str(input: &'a str) -> Result<State<'a>, Error<'a>> { |
| 57 | crate::parse::nom::from_bytes(input.as_bytes()) | 58 | crate::parse::nom::from_bytes(input.as_bytes()) |
| 58 | } | 59 | } |
| @@ -3,7 +3,7 @@ use crate::{bstr::BString, permission}; · 2 unmodified lines | |||
| 3 | #[derive(Debug, thiserror::Error)] | 3 | #[derive(Debug, thiserror::Error)] |
| 4 | pub enum Error { | 4 | pub enum Error { |
| 5 | #[error("Could not open repository conifguration file")] | 5 | #[error("Could not open repository conifguration file")] |
| 6 | Open(#[from] git_config::parser::ParserOrIoError<'static>), | 6 | Open(#[from] git_config::parse::ParserOrIoError<'static>), |
| 7 | #[error("Cannot handle objects formatted as {:?}", .name)] | 7 | #[error("Cannot handle objects formatted as {:?}", .name)] |
| 8 | UnsupportedObjectFormat { name: crate::bstr::BString }, | 8 | UnsupportedObjectFormat { name: crate::bstr::BString }, |
| 9 | #[error("The value for '{}' cannot be empty", .key)] | 9 | #[error("The value for '{}' cannot be empty", .key)] |