mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-27 13:03:11 +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
|
language: rust
|
||||||
sudo: true
|
sudo: true
|
||||||
rust:
|
rust:
|
||||||
- 1.46.0
|
- 1.47.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
|
@ -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)]
|
||||||
|
@ -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(),
|
||||||
|
@ -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,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user