Refactoring: use typed versions of args getters (#7262)
* Replace uses of get_unlabeled_kw_arg with _typed version Signed-off-by: Nick Cameron <nrc@ncameron.org> * Remove more untyped arg getters Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -12,7 +12,7 @@ use crate::{
|
||||
|
||||
/// Offset a plane by a distance along its normal.
|
||||
pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||
let std_plane = args.get_unlabeled_kw_arg("plane")?;
|
||||
let std_plane = args.get_unlabeled_kw_arg_typed("plane", &RuntimeType::plane(), exec_state)?;
|
||||
let offset: TyF64 = args.get_kw_arg_typed("offset", &RuntimeType::length(), exec_state)?;
|
||||
let plane = inner_offset_plane(std_plane, offset, exec_state, &args).await?;
|
||||
Ok(KclValue::Plane { value: Box::new(plane) })
|
||||
|
Reference in New Issue
Block a user