summaryrefslogtreecommitdiff
path: root/src/library/base.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-03-19 17:57:31 +0100
committerLaurenz <laurmaedje@gmail.com>2021-03-19 17:57:31 +0100
commit264a7dedd42e27cd9e604037640cf0594b2ec46b (patch)
treed26feea399d54bb86bd44878f40293983bf5251d /src/library/base.rs
parentca3df70e2a5069832d7d2135967674c34a155442 (diff)
Scheduled maintenance 🔨
- New naming scheme - TextNode instead of NodeText - CallExpr instead of ExprCall - ... - Less glob imports - Removes Value::Args variant - Removes prelude - Renames Layouted to Fragment - Moves font into env - Moves shaping into layout - Moves frame into separate module
Diffstat (limited to 'src/library/base.rs')
-rw-r--r--src/library/base.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/base.rs b/src/library/base.rs
index 4d36b878..22adb1f4 100644
--- a/src/library/base.rs
+++ b/src/library/base.rs
@@ -10,7 +10,7 @@ use super::*;
///
/// # Return value
/// The string representation of the value.
-pub fn repr(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value {
+pub fn repr(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
match args.require::<Value>(ctx, "value") {
Some(value) => pretty(&value).into(),
None => Value::Error,
@@ -27,7 +27,7 @@ pub fn repr(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value {
///
/// # Return value
/// The color with the given components.
-pub fn rgb(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value {
+pub fn rgb(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
let r = args.require(ctx, "red component");
let g = args.require(ctx, "green component");
let b = args.require(ctx, "blue component");
@@ -57,7 +57,7 @@ pub fn rgb(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value {
///
/// # Return value
/// The name of the value's type as a string.
-pub fn type_(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value {
+pub fn type_(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
match args.require::<Value>(ctx, "value") {
Some(value) => value.type_name().into(),
None => Value::Error,