aboutsummaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.rs b/src/util.rs
index 39ac263..5d3baaa 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -70,10 +70,10 @@ pub fn Float(term: f32) -> Term {
return Term::Float(term)
}
-pub fn Str(len: usize, cap: usize, data: Vec<usize>) -> Term {
- return Term::String { len, cap, data }
+pub fn Str(data: &str) -> Term {
+ return Term::String(data.into())
}
-pub fn Union(val: usize, data: Term) -> Term {
- return Term::Union { val, data: Box::new(data) }
+pub fn Union(data: Term) -> Term {
+ return Term::Union(Box::new(data))
}