From 1fdb8010e51b7ab3d29df4ddc123e8e357b201a3 Mon Sep 17 00:00:00 2001 From: abhro <5664668+abhro@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:14:56 -0500 Subject: [PATCH] Remove unnecessary lambdas (#761) --- src/dimensions.jl | 4 ++-- src/units.jl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dimensions.jl b/src/dimensions.jl index b987da7b..918d7225 100644 --- a/src/dimensions.jl +++ b/src/dimensions.jl @@ -32,8 +32,8 @@ true length(xp) > 0 && append!(b, xp) end - sort!(b, by=x->power(x)) - sort!(b, by=x->name(x)) + sort!(b, by=power) + sort!(b, by=name) c = Vector{Dimension}() if !isempty(b) diff --git a/src/units.jl b/src/units.jl index 89df1bf4..e210a3f0 100644 --- a/src/units.jl +++ b/src/units.jl @@ -14,9 +14,9 @@ # linunits is an Array containing all of the Unit objects that were # found in the type parameters of the FreeUnits objects (a0, a...) - sort!(linunits, by=x->power(x)) - sort!(linunits, by=x->tens(x)) - sort!(linunits, by=x->name(x)) + sort!(linunits, by=power) + sort!(linunits, by=tens) + sort!(linunits, by=name) # [m,m,cm,cm^2,cm^3,nm,m^4,μs,μs^2,s] # reordered as: