Lints
This commit is contained in:
@ -96,17 +96,20 @@ async fn snapshot_endpoint(body: Vec<u8>, state3: ExecutorContext) -> Response<B
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn bad_request(msg: String) -> Response<Body> {
|
fn bad_request(msg: String) -> Response<Body> {
|
||||||
|
eprintln!("\tBad request");
|
||||||
let mut resp = Response::new(Body::from(msg));
|
let mut resp = Response::new(Body::from(msg));
|
||||||
*resp.status_mut() = hyper::StatusCode::BAD_REQUEST;
|
*resp.status_mut() = hyper::StatusCode::BAD_REQUEST;
|
||||||
resp
|
resp
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bad_gateway(msg: String) -> Response<Body> {
|
fn bad_gateway(msg: String) -> Response<Body> {
|
||||||
|
eprintln!("\tBad gateway");
|
||||||
let mut resp = Response::new(Body::from(msg));
|
let mut resp = Response::new(Body::from(msg));
|
||||||
*resp.status_mut() = hyper::StatusCode::BAD_GATEWAY;
|
*resp.status_mut() = hyper::StatusCode::BAD_GATEWAY;
|
||||||
resp
|
resp
|
||||||
}
|
}
|
||||||
|
|
||||||
fn kcl_err(err: anyhow::Error) -> Response<Body> {
|
fn kcl_err(err: anyhow::Error) -> Response<Body> {
|
||||||
|
eprintln!("\tBad KCL");
|
||||||
bad_gateway(format!("{err}"))
|
bad_gateway(format!("{err}"))
|
||||||
}
|
}
|
||||||
|
@ -1127,7 +1127,7 @@ impl ExecutorContext {
|
|||||||
pub async fn reset_scene(&self) -> Result<()> {
|
pub async fn reset_scene(&self) -> Result<()> {
|
||||||
self.engine
|
self.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4().into(),
|
uuid::Uuid::new_v4(),
|
||||||
SourceRange::default(),
|
SourceRange::default(),
|
||||||
kittycad::types::ModelingCmd::SceneClearAll {},
|
kittycad::types::ModelingCmd::SceneClearAll {},
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user