From 264a7dedd42e27cd9e604037640cf0594b2ec46b Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 19 Mar 2021 17:57:31 +0100 Subject: =?UTF-8?q?Scheduled=20maintenance=20=F0=9F=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- src/library/base.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/library/base.rs') 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::(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::(ctx, "value") { Some(value) => value.type_name().into(), None => Value::Error, -- cgit v1.2.3