Skip to content

Commit

Permalink
Remove unnecessary lambdas (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhro authored Jan 20, 2025
1 parent 3376fef commit 1fdb801
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/dimensions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/units.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1fdb801

Please sign in to comment.