summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
Diffstat (limited to 'src/library')
-rw-r--r--src/library/boxed.rs2
-rw-r--r--src/library/mod.rs6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/library/boxed.rs b/src/library/boxed.rs
index e02b8c0c..85025264 100644
--- a/src/library/boxed.rs
+++ b/src/library/boxed.rs
@@ -13,7 +13,7 @@ pub async fn boxed(
) -> Pass<Value> {
let mut f = Feedback::new();
- let content = args.take::<SynTree>().unwrap_or(SynTree::new());
+ let content = args.take::<SynTree>().unwrap_or_default();
ctx.base = ctx.spaces[0].size;
ctx.spaces.truncate(1);
diff --git a/src/library/mod.rs b/src/library/mod.rs
index a5fdfc4c..43f74318 100644
--- a/src/library/mod.rs
+++ b/src/library/mod.rs
@@ -14,9 +14,7 @@ pub use font::*;
pub use page::*;
pub use spacing::*;
-use std::rc::Rc;
-
-use crate::eval::Scope;
+use crate::eval::{FuncValue, Scope};
use crate::prelude::*;
macro_rules! std {
@@ -32,7 +30,7 @@ macro_rules! std {
macro_rules! wrap {
($func:expr) => {
- Rc::new(|name, args, ctx| Box::pin($func(name, args, ctx)))
+ FuncValue::new(|name, args, ctx| Box::pin($func(name, args, ctx)))
};
}