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

@ -47,7 +47,7 @@ impl EngineConnection {
fn handle_command(&self, cmd_id: &ModelingCmdId, cmd: &kcmc::ModelingCmd) -> (String, OkModelingCmdResponse) {
let cpp_id = id_to_cpp(cmd_id);
let cmd_id = format!("{}", cmd_id);
let cmd_id = format!("{cmd_id}");
let mut this_response = OkModelingCmdResponse::Empty {};
let new_code = match cmd {
@ -86,7 +86,7 @@ impl EngineConnection {
size,
..
}) => {
let plane_id = format!("plane_{}", cpp_id);
let plane_id = format!("plane_{cpp_id}");
format!(
r#"
auto {plane_id} = make_shared<Object>("plane", glm::dvec3 {{ 0, 0, 0 }});
@ -108,8 +108,8 @@ impl EngineConnection {
)
}
kcmc::ModelingCmd::StartPath(kcmc::StartPath { .. }) => {
let sketch_id = format!("sketch_{}", cpp_id);
let path_id = format!("path_{}", cpp_id);
let sketch_id = format!("sketch_{cpp_id}");
let path_id = format!("path_{cpp_id}");
format!(
r#"
auto {sketch_id} = make_shared<Object>("sketch", glm::dvec3 {{ 0, 0, 0 }});
@ -178,7 +178,7 @@ impl EngineConnection {
)
}
_ => {
format!("//{:?}", cmd)
format!("//{cmd:?}")
}
},
kcmc::ModelingCmd::ClosePath(kcmc::ClosePath { path_id }) => {
@ -240,9 +240,8 @@ impl EngineConnection {
}) => {
format!(
r#"
//face info get {} {}
"#,
object_id, edge_id
//face info get {object_id} {edge_id}
"#
)
}
kcmc::ModelingCmd::EntityCircularPattern(kcmc::EntityCircularPattern {
@ -313,11 +312,11 @@ impl EngineConnection {
// base_code.push_str(&repl_uuid_fix_code);
// base_code
format!("//{:?}", cmd)
format!("//{cmd:?}")
}
_ => {
//helps us follow along with the currently unhandled engine commands
format!("//{:?}", cmd)
format!("//{cmd:?}")
}
};
@ -330,7 +329,7 @@ fn id_to_cpp(id: &ModelingCmdId) -> String {
}
fn uuid_to_cpp(id: &uuid::Uuid) -> String {
let str = format!("{}", id);
let str = format!("{id}");
str::replace(&str, "-", "_")
}

View File

@ -16,5 +16,5 @@ async fn main() {
let result = kcl_to_engine_core(&kcl).await.expect("kcl conversion");
println!("{}", result);
println!("{result}");
}