diff --git a/library/src/compute/create.rs b/library/src/compute/construct.rs similarity index 98% rename from library/src/compute/create.rs rename to library/src/compute/construct.rs index a34c0ba61..bfe42cbe1 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 { Ok(Value::Int(args.expect::("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 { Ok(Value::Float(args.expect::("value")?.0)) @@ -95,7 +95,7 @@ castable! { /// The gray component. /// /// ## Category -/// create +/// construct #[func] pub fn luma(args: &mut Args) -> SourceResult { let Component(luma) = args.expect("gray component")?; @@ -147,7 +147,7 @@ pub fn luma(args: &mut Args) -> SourceResult { /// The alpha component. /// /// ## Category -/// create +/// construct #[func] pub fn rgb(args: &mut Args) -> SourceResult { Ok(Value::Color(if let Some(string) = args.find::>()? { @@ -208,7 +208,7 @@ castable! { /// The key component. /// /// ## Category -/// create +/// construct #[func] pub fn cmyk(args: &mut Args) -> SourceResult { 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 { Ok(Value::Str(args.expect::("value")?.0)) @@ -292,7 +292,7 @@ castable! { /// The name of the label. /// /// ## Category -/// create +/// construct #[func] pub fn label(args: &mut Args) -> SourceResult { Ok(Value::Label(Label(args.expect("string")?))) @@ -331,7 +331,7 @@ pub fn label(args: &mut Args) -> SourceResult { /// backslash, you would need to write `{regex("\\\\")}`. /// /// ## Category -/// create +/// construct #[func] pub fn regex(args: &mut Args) -> SourceResult { let Spanned { v, span } = args.expect::>("regular expression")?; @@ -365,7 +365,7 @@ pub fn regex(args: &mut Args) -> SourceResult { /// The distance between the generated numbers. /// /// ## Category -/// create +/// construct #[func] pub fn range(args: &mut Args) -> SourceResult { let first = args.expect::("end")?; diff --git a/library/src/compute/mod.rs b/library/src/compute/mod.rs index 70690d440..5cfbe1582 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::*; diff --git a/tests/ref/compute/create.png b/tests/ref/compute/construct.png similarity index 100% rename from tests/ref/compute/create.png rename to tests/ref/compute/construct.png diff --git a/tests/typ/compute/create.typ b/tests/typ/compute/construct.typ similarity index 100% rename from tests/typ/compute/create.typ rename to tests/typ/compute/construct.typ