diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-06-06 21:13:59 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-06-06 22:06:16 +0200 |
| commit | fd417da04f7ca4b995de7f6510abafd3e9c31307 (patch) | |
| tree | 3675529c75ca7363701ac8ea306de2cc1d3cbcb3 /src/model/introspect.rs | |
| parent | 168bdf35bd773e67343c965cb473492cc5cae9e7 (diff) | |
Improve value casting infrastructure
Diffstat (limited to 'src/model/introspect.rs')
| -rw-r--r-- | src/model/introspect.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/model/introspect.rs b/src/model/introspect.rs index 87a17a8e..f00f89f5 100644 --- a/src/model/introspect.rs +++ b/src/model/introspect.rs @@ -11,12 +11,12 @@ use indexmap::IndexMap; use super::{Content, Selector}; use crate::diag::StrResult; use crate::doc::{Frame, FrameItem, Meta, Position}; -use crate::eval::{cast_from_value, Value}; +use crate::eval::{cast, Value}; use crate::geom::{Point, Transform}; use crate::model::Label; use crate::util::NonZeroExt; -/// Uniquely identifies an element in the document across multiple layout passes. +/// Identifies the location of an element in the document. /// /// This struct is created by [`Locator::locate`]. #[derive(Copy, Clone, Eq, PartialEq, Hash)] @@ -46,8 +46,8 @@ impl Debug for Location { } } -cast_from_value! { - Location: "location", +cast! { + type Location: "location", } /// Provides locations for elements in the document. |
