Upgrade to the Rust 2024 edition (#2367)

* Update to rust 2024 edition

* Fixes

* Clean up imports

* Cargo fmt again

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Dennis Kobert
2025-03-12 17:29:12 -07:00
committed by GitHub
co-authored by Keavon Chambers
parent 927d7dd9b2
commit beb1c6ae64
253 changed files with 980 additions and 1371 deletions
+8 -13
View File
@@ -1,12 +1,9 @@
use crate::ast::{Literal, Node};
use crate::constants::DEFAULT_FUNCTIONS;
use crate::context::{EvalContext, FunctionProvider, ValueProvider};
use crate::value::{Number, Value};
use thiserror::Error;
use crate::{
ast::{Literal, Node},
constants::DEFAULT_FUNCTIONS,
context::{EvalContext, FunctionProvider, ValueProvider},
value::{Number, Value},
};
#[derive(Debug, Error)]
pub enum EvalError {
#[error("Missing value: {0}")]
@@ -49,14 +46,12 @@ impl Node {
#[cfg(test)]
mod tests {
use crate::{
ast::{BinaryOp, Literal, Node, UnaryOp},
context::{EvalContext, ValueMap},
value::Value,
};
use crate::ast::{BinaryOp, Literal, Node, UnaryOp};
use crate::context::{EvalContext, ValueMap};
use crate::value::Value;
macro_rules! eval_tests {
($($name:ident: $expected:expr => $expr:expr),* $(,)?) => {
($($name:ident: $expected:expr_2021 => $expr:expr_2021),* $(,)?) => {
$(
#[test]
fn $name() {