mirror of
https://github.com/revanced/revanced-discord-bot.git
synced 2025-04-30 06:24:27 +02:00
chore: Fix linter warnings
This commit is contained in:
parent
bd43573752
commit
256666d43f
@ -2,7 +2,7 @@ macro_rules! assert_correct_domain {
|
|||||||
($url:expr, $expected:expr) => {{
|
($url:expr, $expected:expr) => {{
|
||||||
if let Some(domain) = $url.domain() {
|
if let Some(domain) = $url.domain() {
|
||||||
if domain != $expected {
|
if domain != $expected {
|
||||||
return Err(ParserError::WrongParserError(
|
return Err(ParserError::WrongParser(
|
||||||
$expected.to_string(),
|
$expected.to_string(),
|
||||||
domain.to_string(),
|
domain.to_string(),
|
||||||
));
|
));
|
||||||
|
@ -151,7 +151,7 @@ impl CodeUrlParser for GitHubCodeUrl {
|
|||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum ParserError {
|
pub enum ParserError {
|
||||||
Error(String),
|
Error(String),
|
||||||
WrongParserError(String, String),
|
WrongParser(String, String),
|
||||||
ConversionError(String),
|
ConversionError(String),
|
||||||
InvalidFragment(String),
|
InvalidFragment(String),
|
||||||
FailedToGetCode(String),
|
FailedToGetCode(String),
|
||||||
@ -165,7 +165,7 @@ impl fmt::Display for ParserError {
|
|||||||
ParserError::Error(e) => {
|
ParserError::Error(e) => {
|
||||||
write!(f, "Error: {e}")
|
write!(f, "Error: {e}")
|
||||||
},
|
},
|
||||||
ParserError::WrongParserError(expected, got) => {
|
ParserError::WrongParser(expected, got) => {
|
||||||
write!(f, "Expected parser {expected}, got {got}")
|
write!(f, "Expected parser {expected}, got {got}")
|
||||||
},
|
},
|
||||||
ParserError::ConversionError(conversion_error) => {
|
ParserError::ConversionError(conversion_error) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user