diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-04-07 14:32:35 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-04-07 16:19:51 +0200 |
| commit | 1192132dc0a9e991953fd29e93f87c8437a53ea0 (patch) | |
| tree | 67061e75a5a15c7997a3ac2de349b5e9ce234434 /src/eval/mod.rs | |
| parent | eb22eed31b08874fbbbee68d2ae59f0d02f9e95d (diff) | |
Rename length-related types
`Fractional` => `Fraction`
`Relative` => `Ratio`
`Linear` => `Relative`
Diffstat (limited to 'src/eval/mod.rs')
| -rw-r--r-- | src/eval/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eval/mod.rs b/src/eval/mod.rs index 564dca20..e83c8159 100644 --- a/src/eval/mod.rs +++ b/src/eval/mod.rs @@ -41,7 +41,7 @@ use parking_lot::{MappedRwLockWriteGuard, RwLockWriteGuard}; use unicode_segmentation::UnicodeSegmentation; use crate::diag::{At, StrResult, Trace, Tracepoint, TypResult}; -use crate::geom::{Angle, Fractional, Length, Relative}; +use crate::geom::{Angle, Fraction, Length, Ratio}; use crate::library; use crate::syntax::ast::*; use crate::syntax::{Span, Spanned}; @@ -245,8 +245,8 @@ impl Eval for Lit { LitKind::Float(v) => Value::Float(v), LitKind::Length(v, unit) => Value::Length(Length::with_unit(v, unit)), LitKind::Angle(v, unit) => Value::Angle(Angle::with_unit(v, unit)), - LitKind::Percent(v) => Value::Relative(Relative::new(v / 100.0)), - LitKind::Fractional(v) => Value::Fractional(Fractional::new(v)), + LitKind::Percent(v) => Value::Ratio(Ratio::new(v / 100.0)), + LitKind::Fractional(v) => Value::Fraction(Fraction::new(v)), LitKind::Str(ref v) => Value::Str(v.clone()), }) } |
