Merge pull request #33 from Orange-OpenSource/feature/update-rust-1.47.0

Update to rust 1.47.0
This commit is contained in:
Fabrice Reix 2020-10-11 21:08:05 +02:00 committed by GitHub
commit 00de621f1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 18 deletions

View File

@ -1,7 +1,7 @@
language: rust language: rust
sudo: true sudo: true
rust: rust:
- 1.46.0 - 1.47.0
jobs: jobs:
include: include:

View File

@ -58,10 +58,7 @@ pub fn parse(reader: &mut Reader) -> ParseResult<'static, String> {
} }
fn is_valid(s: &str) -> bool { fn is_valid(s: &str) -> bool {
match parser::parse(s) { matches!(parser::parse(s), Ok(_))
Ok(_) => true,
_ => false,
}
} }
#[cfg(test)] #[cfg(test)]

View File

@ -112,11 +112,7 @@ impl PredicateFunc {
) -> Result<AssertResult, Error> { ) -> Result<AssertResult, Error> {
match optional_value { match optional_value {
None => { None => {
let type_mismatch = if let PredicateFuncValue::Exist {} = self.value { let type_mismatch = !matches!(self.value, PredicateFuncValue::Exist {});
false
} else {
true
};
Ok(AssertResult { Ok(AssertResult {
success: false, success: false,
actual: "none".to_string(), actual: "none".to_string(),

View File

@ -71,10 +71,7 @@ impl TemplateElement {
impl Value { impl Value {
pub fn is_renderable(&self) -> bool { pub fn is_renderable(&self) -> bool {
match self { matches!(self, Value::Integer(_) | Value::Bool(_) | Value::Float(_, _) | Value::String(_))
Value::Integer(_) | Value::Bool(_) | Value::Float(_, _) | Value::String(_) => true,
_ => false,
}
} }
} }

View File

@ -89,10 +89,7 @@ impl Value {
} }
pub fn is_scalar(&self) -> bool { pub fn is_scalar(&self) -> bool {
match self { !matches!(self, Value::Nodeset(_) | Value::List(_))
Value::Nodeset(_) | Value::List(_) => false,
_ => true,
}
} }
} }