summaryrefslogtreecommitdiff
path: root/library/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-12-21 23:51:15 +0100
committerLaurenz <laurmaedje@gmail.com>2022-12-21 23:51:15 +0100
commit4c92ab4ace41a20ccea59bbdf6917b5dfa29121f (patch)
tree5d444b04657dfa0521884953520ed40af37efd4e /library/src
parent1eda162867afab656ec9b95c85f725cd676d4f04 (diff)
Rename the `create` category to `construct`
Diffstat (limited to 'library/src')
-rw-r--r--library/src/compute/construct.rs (renamed from library/src/compute/create.rs)18
-rw-r--r--library/src/compute/mod.rs4
2 files changed, 11 insertions, 11 deletions
diff --git a/library/src/compute/create.rs b/library/src/compute/construct.rs
index a34c0ba6..bfe42cbe 100644
--- a/library/src/compute/create.rs
+++ b/library/src/compute/construct.rs
@@ -24,7 +24,7 @@ use crate::prelude::*;
/// The value that should be converted to an integer.
///
/// ## Category
-/// create
+/// construct
#[func]
pub fn int(args: &mut Args) -> SourceResult<Value> {
Ok(Value::Int(args.expect::<ToInt>("value")?.0))
@@ -63,7 +63,7 @@ castable! {
/// The value that should be converted to a float.
///
/// ## Category
-/// create
+/// construct
#[func]
pub fn float(args: &mut Args) -> SourceResult<Value> {
Ok(Value::Float(args.expect::<ToFloat>("value")?.0))
@@ -95,7 +95,7 @@ castable! {
/// The gray component.
///
/// ## Category
-/// create
+/// construct
#[func]
pub fn luma(args: &mut Args) -> SourceResult<Value> {
let Component(luma) = args.expect("gray component")?;
@@ -147,7 +147,7 @@ pub fn luma(args: &mut Args) -> SourceResult<Value> {
/// The alpha component.
///
/// ## Category
-/// create
+/// construct
#[func]
pub fn rgb(args: &mut Args) -> SourceResult<Value> {
Ok(Value::Color(if let Some(string) = args.find::<Spanned<EcoString>>()? {
@@ -208,7 +208,7 @@ castable! {
/// The key component.
///
/// ## Category
-/// create
+/// construct
#[func]
pub fn cmyk(args: &mut Args) -> SourceResult<Value> {
let RatioComponent(c) = args.expect("cyan component")?;
@@ -250,7 +250,7 @@ castable! {
/// The value that should be converted to a string.
///
/// ## Category
-/// create
+/// construct
#[func]
pub fn str(args: &mut Args) -> SourceResult<Value> {
Ok(Value::Str(args.expect::<ToStr>("value")?.0))
@@ -292,7 +292,7 @@ castable! {
/// The name of the label.
///
/// ## Category
-/// create
+/// construct
#[func]
pub fn label(args: &mut Args) -> SourceResult<Value> {
Ok(Value::Label(Label(args.expect("string")?)))
@@ -331,7 +331,7 @@ pub fn label(args: &mut Args) -> SourceResult<Value> {
/// backslash, you would need to write `{regex("\\\\")}`.
///
/// ## Category
-/// create
+/// construct
#[func]
pub fn regex(args: &mut Args) -> SourceResult<Value> {
let Spanned { v, span } = args.expect::<Spanned<EcoString>>("regular expression")?;
@@ -365,7 +365,7 @@ pub fn regex(args: &mut Args) -> SourceResult<Value> {
/// The distance between the generated numbers.
///
/// ## Category
-/// create
+/// construct
#[func]
pub fn range(args: &mut Args) -> SourceResult<Value> {
let first = args.expect::<i64>("end")?;
diff --git a/library/src/compute/mod.rs b/library/src/compute/mod.rs
index 70690d44..5cfbe158 100644
--- a/library/src/compute/mod.rs
+++ b/library/src/compute/mod.rs
@@ -1,13 +1,13 @@
//! Computational functions.
mod calc;
-mod create;
+mod construct;
mod data;
mod foundations;
mod utility;
pub use self::calc::*;
-pub use self::create::*;
+pub use self::construct::*;
pub use self::data::*;
pub use self::foundations::*;
pub use self::utility::*;