mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
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:
@@ -1,21 +1,15 @@
|
||||
use std::num::{ParseFloatError, ParseIntError};
|
||||
|
||||
use crate::ast::{BinaryOp, Literal, Node, UnaryOp, Unit};
|
||||
use crate::context::EvalContext;
|
||||
use crate::value::{Complex, Number, Value};
|
||||
use lazy_static::lazy_static;
|
||||
use num_complex::ComplexFloat;
|
||||
use pest::{
|
||||
iterators::{Pair, Pairs},
|
||||
pratt_parser::{Assoc, Op, PrattParser},
|
||||
Parser,
|
||||
};
|
||||
use pest::Parser;
|
||||
use pest::iterators::{Pair, Pairs};
|
||||
use pest::pratt_parser::{Assoc, Op, PrattParser};
|
||||
use pest_derive::Parser;
|
||||
use std::num::{ParseFloatError, ParseIntError};
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::{
|
||||
ast::{BinaryOp, Literal, Node, UnaryOp, Unit},
|
||||
context::EvalContext,
|
||||
value::{Complex, Number, Value},
|
||||
};
|
||||
|
||||
#[derive(Parser)]
|
||||
#[grammar = "./grammer.pest"] // Point to the grammar file
|
||||
struct ExprParser;
|
||||
@@ -321,7 +315,7 @@ fn parse_expr(pairs: Pairs<Rule>) -> Result<(Node, NodeMetadata), ParseError> {
|
||||
mod tests {
|
||||
use super::*;
|
||||
macro_rules! test_parser {
|
||||
($($name:ident: $input:expr => $expected:expr),* $(,)?) => {
|
||||
($($name:ident: $input:expr_2021 => $expected:expr_2021),* $(,)?) => {
|
||||
$(
|
||||
#[test]
|
||||
fn $name() {
|
||||
|
||||
Reference in New Issue
Block a user