Update compiler (#725)
* update compiler to recent nightly * cargo fmt * fix clippy but ructe code is still complaining * update circleci and rocket_csrf * fix last clippy problems * cargo fmt * fix build issue was caused be improper handling of recursive template (comment) by old ructe, which is fixed on newer version
This commit is contained in:
@@ -119,7 +119,7 @@ impl Timeline {
|
||||
}
|
||||
})
|
||||
{
|
||||
Err(err)?;
|
||||
return Err(err);
|
||||
}
|
||||
}
|
||||
Self::insert(
|
||||
@@ -157,7 +157,7 @@ impl Timeline {
|
||||
}
|
||||
})
|
||||
{
|
||||
Err(err)?;
|
||||
return Err(err);
|
||||
}
|
||||
}
|
||||
Self::insert(
|
||||
@@ -495,8 +495,7 @@ mod tests {
|
||||
),
|
||||
published: true,
|
||||
license: "GPL".to_string(),
|
||||
source: "Actually, GNU+Linux, GNU×Linux, or GNU¿Linux are better."
|
||||
.to_string(),
|
||||
source: "Actually, GNU+Linux, GNU×Linux, or GNU¿Linux are better.".to_string(),
|
||||
ap_url: "".to_string(),
|
||||
creation_date: None,
|
||||
subtitle: "".to_string(),
|
||||
|
||||
@@ -79,7 +79,7 @@ impl<'a> Token<'a> {
|
||||
impl<'a> ToString for Token<'a> {
|
||||
fn to_string(&self) -> String {
|
||||
if let Token::Word(0, 0, v) = self {
|
||||
return v.to_string();
|
||||
return (*v).to_string();
|
||||
}
|
||||
format!(
|
||||
"'{}'",
|
||||
@@ -181,7 +181,7 @@ impl<'a> TQ<'a> {
|
||||
TQ::Or(inner) => inner.iter().flat_map(TQ::list_used_lists).collect(),
|
||||
TQ::And(inner) => inner.iter().flat_map(TQ::list_used_lists).collect(),
|
||||
TQ::Arg(Arg::In(typ, List::List(name)), _) => vec![(
|
||||
name.to_string(),
|
||||
(*name).to_string(),
|
||||
match typ {
|
||||
WithList::Blog => ListType::Blog,
|
||||
WithList::Author { .. } => ListType::User,
|
||||
@@ -290,7 +290,8 @@ impl WithList {
|
||||
(_, _) => Err(QueryError::RuntimeError(format!(
|
||||
"The list '{}' is of the wrong type for this usage",
|
||||
name
|
||||
)))?,
|
||||
))
|
||||
.into()),
|
||||
}
|
||||
}
|
||||
List::Array(list) => match self {
|
||||
@@ -811,9 +812,17 @@ mod tests {
|
||||
);
|
||||
|
||||
let expect_keyword = TimelineQuery::parse(r#"not_a_field contains something"#).unwrap_err();
|
||||
assert_eq!(expect_keyword, QueryError::SyntaxError(0, 11, "Syntax Error: Expected one of 'blog', \
|
||||
assert_eq!(
|
||||
expect_keyword,
|
||||
QueryError::SyntaxError(
|
||||
0,
|
||||
11,
|
||||
"Syntax Error: Expected one of 'blog', \
|
||||
'author', 'license', 'tags', 'lang', 'title', 'subtitle', 'content', 'followed', 'has_cover', \
|
||||
'local' or 'all', got 'not_a_field'".to_owned()));
|
||||
'local' or 'all', got 'not_a_field'"
|
||||
.to_owned()
|
||||
)
|
||||
);
|
||||
|
||||
let expect_bracket_or_comma = TimelineQuery::parse(r#"lang in [en ["#).unwrap_err();
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user