diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-04-18 19:10:55 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-04-18 19:16:13 +0200 |
| commit | d10b53df0b487036b0d639b6033f4568648cfff1 (patch) | |
| tree | 5209581e847af37c9a770e2e7e43d95bff2e113f /src | |
| parent | 35302d20047c58baa99065a4574eafe1920e7be6 (diff) | |
Clippy
Diffstat (limited to 'src')
| -rw-r--r-- | src/eval/func.rs | 4 | ||||
| -rw-r--r-- | src/eval/module.rs | 2 | ||||
| -rw-r--r-- | src/eval/value.rs | 4 | ||||
| -rw-r--r-- | src/lib.rs | 2 | ||||
| -rw-r--r-- | src/model/content.rs | 2 |
5 files changed, 7 insertions, 7 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%"); @@ -1,4 +1,3 @@ -#![allow(clippy::comparison_chain)] //! The compiler for the _Typst_ markup language. //! //! # Steps @@ -34,6 +33,7 @@ //! [raster images]: export::render #![recursion_limit = "1000"] +#![allow(clippy::comparison_chain)] extern crate self as typst; diff --git a/src/model/content.rs b/src/model/content.rs index 4300790c..619793ec 100644 --- a/src/model/content.rs +++ b/src/model/content.rs @@ -17,8 +17,8 @@ use crate::syntax::Span; use crate::util::pretty_array_like; /// Composable representation of styled content. -#[allow(clippy::derived_hash_with_manual_eq)] #[derive(Clone, Hash)] +#[allow(clippy::derived_hash_with_manual_eq)] pub struct Content { func: ElemFunc, attrs: EcoVec<Attr>, |
