summaryrefslogtreecommitdiff
path: root/library/src/structure
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-24 17:39:08 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-24 17:41:41 +0100
commit8d3c68a1deb28dce2b80ed61f85141180ce6a951 (patch)
treede007203d448d6b6a2df7838e802f85d23ccd1a6 /library/src/structure
parent5ae81971f299688b05d77af208d7bb44ffce5e2d (diff)
Protect Vm
Diffstat (limited to 'library/src/structure')
-rw-r--r--library/src/structure/heading.rs2
-rw-r--r--library/src/structure/list.rs2
-rw-r--r--library/src/structure/reference.rs2
-rw-r--r--library/src/structure/table.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/library/src/structure/heading.rs b/library/src/structure/heading.rs
index d99e2db8..cf732a4e 100644
--- a/library/src/structure/heading.rs
+++ b/library/src/structure/heading.rs
@@ -16,7 +16,7 @@ pub struct HeadingNode {
#[node(Show, Finalize)]
impl HeadingNode {
- fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> {
+ fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> {
Ok(Self {
body: args.expect("body")?,
level: args.named("level")?.unwrap_or(NonZeroUsize::new(1).unwrap()),
diff --git a/library/src/structure/list.rs b/library/src/structure/list.rs
index 2a3f3035..222dcbcf 100644
--- a/library/src/structure/list.rs
+++ b/library/src/structure/list.rs
@@ -38,7 +38,7 @@ impl<const L: ListKind> ListNode<L> {
/// The spacing between the items of a wide (non-tight) list.
pub const SPACING: Smart<Spacing> = Smart::Auto;
- fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> {
+ fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> {
let items = match L {
LIST => args
.all()?
diff --git a/library/src/structure/reference.rs b/library/src/structure/reference.rs
index 4f672707..361f8c25 100644
--- a/library/src/structure/reference.rs
+++ b/library/src/structure/reference.rs
@@ -7,7 +7,7 @@ pub struct RefNode(pub EcoString);
#[node(Show)]
impl RefNode {
- fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> {
+ fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> {
Ok(Self(args.expect("target")?).pack())
}
diff --git a/library/src/structure/table.rs b/library/src/structure/table.rs
index eaadc3a1..54413b63 100644
--- a/library/src/structure/table.rs
+++ b/library/src/structure/table.rs
@@ -23,7 +23,7 @@ impl TableNode {
/// How much to pad the cells's content.
pub const PADDING: Rel<Length> = Abs::pt(5.0).into();
- fn construct(_: &mut Vm, args: &mut Args) -> SourceResult<Content> {
+ fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> {
let TrackSizings(columns) = args.named("columns")?.unwrap_or_default();
let TrackSizings(rows) = args.named("rows")?.unwrap_or_default();
let TrackSizings(base_gutter) = args.named("gutter")?.unwrap_or_default();