Rename record_value_edge to record_value_source

This commit is contained in:
Dennis Kobert
2026-09-06 16:26:49 +00:00
parent daf0231c0c
commit 1e91511f93
4 changed files with 19 additions and 19 deletions

View File

@@ -555,7 +555,7 @@ mod tests {
let mut args = args.into_iter();
let value = args.next().ok_or(ConstructionError::Arity { expected: 1, got: 0 })?.downcast_record::<String>()?;
drop(value);
Ok(crate::value::record_value_edge(0u32))
Ok(crate::value::record_value_source(0u32))
}
let entry = RegistryEntry {
layout_meta: None,
@@ -563,12 +563,12 @@ mod tests {
constructor: construct_strlen,
};
let owned = crate::value::record_value_edge("typed".to_string());
let owned = crate::value::record_value_source("typed".to_string());
assert!(construct(&entry, vec![owned]).is_ok());
assert_eq!(construct(&entry, vec![]).unwrap_err(), ConstructionError::Arity { expected: 1, got: 0 });
let mistyped = crate::value::record_value_edge(1.0f64);
let mistyped = crate::value::record_value_source(1.0f64);
assert_eq!(
construct(&entry, vec![mistyped]).unwrap_err(),
ConstructionError::Type {

View File

@@ -33,8 +33,8 @@ where
}
}
/// The native record edge of a constant.
pub fn record_value_edge<T: Clone + Send + Sync + dyn_any::StaticTypeSized + 'static>(value: T) -> crate::registry::SourceHandle
/// The native record source of a constant.
pub fn record_value_source<T: Clone + Send + Sync + dyn_any::StaticTypeSized + 'static>(value: T) -> crate::registry::SourceHandle
where
T::Static: Clone + Send + Sync,
{