From 256666d43f293f0bfc91585b63d1cc206d032da8 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 22 Jan 2024 00:51:44 +0100 Subject: [PATCH] chore: Fix linter warnings --- src/utils/code_embed/macros.rs | 2 +- src/utils/code_embed/url_parser.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/code_embed/macros.rs b/src/utils/code_embed/macros.rs index 849a7d4..e93100f 100644 --- a/src/utils/code_embed/macros.rs +++ b/src/utils/code_embed/macros.rs @@ -2,7 +2,7 @@ macro_rules! assert_correct_domain { ($url:expr, $expected:expr) => {{ if let Some(domain) = $url.domain() { if domain != $expected { - return Err(ParserError::WrongParserError( + return Err(ParserError::WrongParser( $expected.to_string(), domain.to_string(), )); diff --git a/src/utils/code_embed/url_parser.rs b/src/utils/code_embed/url_parser.rs index 2f26e0c..80a5921 100644 --- a/src/utils/code_embed/url_parser.rs +++ b/src/utils/code_embed/url_parser.rs @@ -151,7 +151,7 @@ impl CodeUrlParser for GitHubCodeUrl { #[derive(Debug, Clone)] pub enum ParserError { Error(String), - WrongParserError(String, String), + WrongParser(String, String), ConversionError(String), InvalidFragment(String), FailedToGetCode(String), @@ -165,7 +165,7 @@ impl fmt::Display for ParserError { ParserError::Error(e) => { write!(f, "Error: {e}") }, - ParserError::WrongParserError(expected, got) => { + ParserError::WrongParser(expected, got) => { write!(f, "Expected parser {expected}, got {got}") }, ParserError::ConversionError(conversion_error) => {