mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Rename record_value_edge to record_value_source
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user