summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-06-12 17:16:14 +0200
committerLaurenz <laurmaedje@gmail.com>2022-06-12 17:26:18 +0200
commit6e3b1a2c80428d581d00b9d65e1c45401df2e210 (patch)
tree34d4b1c200851aa77af66b737bfe445e2da11f44 /tests
parented6550fdb08eae92bffab6b6b137b1e0eebf62c6 (diff)
Make all fields of `Frame` private
Diffstat (limited to 'tests')
-rw-r--r--tests/typeset.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs
index 452219a4..341a04c0 100644
--- a/tests/typeset.rs
+++ b/tests/typeset.rs
@@ -538,8 +538,8 @@ fn render(ctx: &mut Context, frames: &[Arc<Frame>]) -> sk::Pixmap {
.iter()
.map(|frame| {
let limit = Length::cm(100.0);
- if frame.size.x > limit || frame.size.y > limit {
- panic!("overlarge frame: {:?}", frame.size);
+ if frame.width() > limit || frame.height() > limit {
+ panic!("overlarge frame: {:?}", frame.size());
}
typst::export::render(ctx, frame, pixel_per_pt)
})
@@ -579,7 +579,7 @@ fn render_links(
ctx: &Context,
frame: &Frame,
) {
- for (pos, element) in &frame.elements {
+ for (pos, element) in frame.elements() {
let ts = ts.pre_translate(pos.x.to_pt() as f32, pos.y.to_pt() as f32);
match *element {
Element::Group(ref group) => {