summaryrefslogtreecommitdiff
path: root/src/eval
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-04-18 19:10:55 +0200
committerLaurenz <laurmaedje@gmail.com>2023-04-18 19:16:13 +0200
commitd10b53df0b487036b0d639b6033f4568648cfff1 (patch)
tree5209581e847af37c9a770e2e7e43d95bff2e113f /src/eval
parent35302d20047c58baa99065a4574eafe1920e7be6 (diff)
Clippy
Diffstat (limited to 'src/eval')
-rw-r--r--src/eval/func.rs4
-rw-r--r--src/eval/module.rs2
-rw-r--r--src/eval/value.rs4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/eval/func.rs b/src/eval/func.rs
index 582eabd4..faf2d696 100644
--- a/src/eval/func.rs
+++ b/src/eval/func.rs
@@ -17,8 +17,8 @@ use crate::syntax::{SourceId, Span, SyntaxNode};
use crate::World;
/// An evaluatable function.
-#[allow(clippy::derived_hash_with_manual_eq)]
#[derive(Clone, Hash)]
+#[allow(clippy::derived_hash_with_manual_eq)]
pub struct Func {
/// The internal representation.
repr: Repr,
@@ -278,8 +278,8 @@ pub enum Param {
impl Closure {
/// Call the function in the context with the arguments.
- #[allow(clippy::too_many_arguments)]
#[comemo::memoize]
+ #[allow(clippy::too_many_arguments)]
fn call(
this: &Func,
world: Tracked<dyn World>,
diff --git a/src/eval/module.rs b/src/eval/module.rs
index 35025270..fbfdd4e6 100644
--- a/src/eval/module.rs
+++ b/src/eval/module.rs
@@ -7,8 +7,8 @@ use super::{Content, Scope, Value};
use crate::diag::StrResult;
/// An evaluated module, ready for importing or typesetting.
-#[allow(clippy::derived_hash_with_manual_eq)]
#[derive(Clone, Hash)]
+#[allow(clippy::derived_hash_with_manual_eq)]
pub struct Module(Arc<Repr>);
/// The internal representation.
diff --git a/src/eval/value.rs b/src/eval/value.rs
index 3fd9ed42..53db169c 100644
--- a/src/eval/value.rs
+++ b/src/eval/value.rs
@@ -241,8 +241,8 @@ impl Hash for Value {
}
/// A dynamic value.
-#[allow(clippy::derived_hash_with_manual_eq)]
#[derive(Clone, Hash)]
+#[allow(clippy::derived_hash_with_manual_eq)]
pub struct Dynamic(Arc<dyn Bounds>);
impl Dynamic {
@@ -426,7 +426,7 @@ mod tests {
test(Value::None, "none");
test(false, "false");
test(12i64, "12");
- test(3.14, "3.14");
+ test(3.24, "3.24");
test(Abs::pt(5.5), "5.5pt");
test(Angle::deg(90.0), "90deg");
test(Ratio::one() / 2.0, "50%");