Merge branch 'main' of https://github.com/rhaiscript/rhai
This commit is contained in:
@@ -793,11 +793,8 @@ impl AST {
|
||||
|| !options.contains(ASTFlags::CONSTANT) && include_variables =>
|
||||
{
|
||||
let (name, expr, ..) = &**x;
|
||||
if let Some(value) = expr.get_literal_value() {
|
||||
Some((name.as_str(), options.contains(ASTFlags::CONSTANT), value))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
expr.get_literal_value()
|
||||
.map(|value| (name.as_str(), options.contains(ASTFlags::CONSTANT), value))
|
||||
}
|
||||
_ => None,
|
||||
})
|
||||
|
@@ -215,8 +215,8 @@ impl IntoIterator for RangeCase {
|
||||
#[inline(always)]
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
match self {
|
||||
Self::ExclusiveInt(r, ..) => Box::new(r.into_iter()),
|
||||
Self::InclusiveInt(r, ..) => Box::new(r.into_iter()),
|
||||
Self::ExclusiveInt(r, ..) => Box::new(r),
|
||||
Self::InclusiveInt(r, ..) => Box::new(r),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -507,8 +507,7 @@ impl<'a> IntoIterator for &'a StmtBlock {
|
||||
|
||||
#[inline(always)]
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
let x = self.block.iter();
|
||||
x
|
||||
self.block.iter()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user