mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-26 20:42:01 +03:00
Merge pull request #33 from Orange-OpenSource/feature/update-rust-1.47.0
Update to rust 1.47.0
This commit is contained in:
commit
00de621f1c
@ -1,7 +1,7 @@
|
||||
language: rust
|
||||
sudo: true
|
||||
rust:
|
||||
- 1.46.0
|
||||
- 1.47.0
|
||||
|
||||
jobs:
|
||||
include:
|
||||
|
@ -58,10 +58,7 @@ pub fn parse(reader: &mut Reader) -> ParseResult<'static, String> {
|
||||
}
|
||||
|
||||
fn is_valid(s: &str) -> bool {
|
||||
match parser::parse(s) {
|
||||
Ok(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(parser::parse(s), Ok(_))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -112,11 +112,7 @@ impl PredicateFunc {
|
||||
) -> Result<AssertResult, Error> {
|
||||
match optional_value {
|
||||
None => {
|
||||
let type_mismatch = if let PredicateFuncValue::Exist {} = self.value {
|
||||
false
|
||||
} else {
|
||||
true
|
||||
};
|
||||
let type_mismatch = !matches!(self.value, PredicateFuncValue::Exist {});
|
||||
Ok(AssertResult {
|
||||
success: false,
|
||||
actual: "none".to_string(),
|
||||
|
@ -71,10 +71,7 @@ impl TemplateElement {
|
||||
|
||||
impl Value {
|
||||
pub fn is_renderable(&self) -> bool {
|
||||
match self {
|
||||
Value::Integer(_) | Value::Bool(_) | Value::Float(_, _) | Value::String(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(self, Value::Integer(_) | Value::Bool(_) | Value::Float(_, _) | Value::String(_))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,10 +89,7 @@ impl Value {
|
||||
}
|
||||
|
||||
pub fn is_scalar(&self) -> bool {
|
||||
match self {
|
||||
Value::Nodeset(_) | Value::List(_) => false,
|
||||
_ => true,
|
||||
}
|
||||
!matches!(self, Value::Nodeset(_) | Value::List(_))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user