Fix some nightly clippy warnings (#329)

This commit is contained in:
JT
2021-11-13 13:42:13 +13:00
committed by GitHub
parent db2bca56c9
commit 14a2918bba
5 changed files with 12 additions and 34 deletions

View File

@ -13,7 +13,7 @@ pub use lite_parse::{lite_parse, LiteBlock};
pub use parse_keywords::{
parse_alias, parse_def, parse_def_predecl, parse_let, parse_module, parse_use,
};
pub use parser::{find_captures_in_expr, parse, Import, VarDecl};
pub use parser::{find_captures_in_expr, parse, Import};
#[cfg(feature = "plugin")]
pub use parse_keywords::parse_plugin;

View File

@ -24,12 +24,6 @@ use crate::parse_keywords::parse_plugin;
#[derive(Debug, Clone)]
pub enum Import {}
#[derive(Debug, Clone)]
pub struct VarDecl {
var_id: VarId,
expression: Expression,
}
pub fn garbage(span: Span) -> Expression {
Expression::garbage(span)
}
@ -271,7 +265,7 @@ fn parse_short_flags(
error = error.or_else(|| {
Some(ParseError::UnknownFlag(
sig.name.clone(),
format!("-{}", String::from_utf8_lossy(contents).to_string()),
format!("-{}", String::from_utf8_lossy(contents)),
*first,
))
});
@ -281,7 +275,7 @@ fn parse_short_flags(
error = error.or_else(|| {
Some(ParseError::UnknownFlag(
sig.name.clone(),
format!("-{}", String::from_utf8_lossy(contents).to_string()),
format!("-{}", String::from_utf8_lossy(contents)),
*first,
))
});
@ -291,7 +285,7 @@ fn parse_short_flags(
error = error.or_else(|| {
Some(ParseError::UnknownFlag(
sig.name.clone(),
format!("-{}", String::from_utf8_lossy(contents).to_string()),
format!("-{}", String::from_utf8_lossy(contents)),
*first,
))
});
@ -302,7 +296,7 @@ fn parse_short_flags(
error = error.or_else(|| {
Some(ParseError::UnknownFlag(
sig.name.clone(),
format!("-{}", String::from_utf8_lossy(contents).to_string()),
format!("-{}", String::from_utf8_lossy(contents)),
*first,
))
});