Bump cargo to 1.88; 2024 edition for kcl-lib (#7618)

This is a big one because the edition changes a fair number of things.
This commit is contained in:
Adam Chalmers
2025-06-26 17:02:54 -05:00
committed by GitHub
parent 6a2027cd51
commit 4356885aa2
100 changed files with 769 additions and 802 deletions

View File

@ -2,22 +2,21 @@
use anyhow::Result;
use kcmc::{
each_cmd as mcmd,
ModelingCmd, each_cmd as mcmd,
length_unit::LengthUnit,
shared::{Angle, Opposite},
ModelingCmd,
};
use kittycad_modeling_cmds::{self as kcmc, shared::Point3d};
use super::{args::TyF64, DEFAULT_TOLERANCE_MM};
use super::{DEFAULT_TOLERANCE_MM, args::TyF64};
use crate::{
errors::{KclError, KclErrorDetails},
execution::{
types::{NumericType, PrimitiveType, RuntimeType},
ExecState, KclValue, ModelingCmdMeta, Sketch, Solid,
types::{NumericType, PrimitiveType, RuntimeType},
},
parsing::ast::types::TagNode,
std::{axis_or_reference::Axis2dOrEdgeReference, extrude::do_post_extrude, Args},
std::{Args, axis_or_reference::Axis2dOrEdgeReference, extrude::do_post_extrude},
};
extern crate nalgebra_glm as glm;
@ -76,7 +75,7 @@ async fn inner_revolve(
// nice and we use the other data in the docs, so we still need use the derive above for the json schema.
if !(-360.0..=360.0).contains(&angle) || angle == 0.0 {
return Err(KclError::new_semantic(KclErrorDetails::new(
format!("Expected angle to be between -360 and 360 and not 0, found `{}`", angle),
format!("Expected angle to be between -360 and 360 and not 0, found `{angle}`"),
vec![args.source_range],
)));
}
@ -89,8 +88,7 @@ async fn inner_revolve(
if !(-360.0..=360.0).contains(&bidirectional_angle) || bidirectional_angle == 0.0 {
return Err(KclError::new_semantic(KclErrorDetails::new(
format!(
"Expected bidirectional angle to be between -360 and 360 and not 0, found `{}`",
bidirectional_angle
"Expected bidirectional angle to be between -360 and 360 and not 0, found `{bidirectional_angle}`"
),
vec![args.source_range],
)));
@ -100,10 +98,7 @@ async fn inner_revolve(
let ang = angle.signum() * bidirectional_angle + angle;
if !(-360.0..=360.0).contains(&ang) {
return Err(KclError::new_semantic(KclErrorDetails::new(
format!(
"Combined angle and bidirectional must be between -360 and 360, found '{}'",
ang
),
format!("Combined angle and bidirectional must be between -360 and 360, found '{ang}'"),
vec![args.source_range],
)));
}