Skip to content

Commit a1ba7e7

Browse files
committed
Stylistic tweaks
1 parent 81321a0 commit a1ba7e7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/write_once_read_many.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ for f in (:findfirst, :filter)
2424
end
2525

2626
Base.getindex(w::WriteOnceReadMany, i::Union{Integer,Symbol}) = getindex(w._raw_data, i)
27-
Base.get(w::WriteOnceReadMany{<:Dict}, a, b) = get(w._raw_data, a, b)
27+
Base.get(w::WriteOnceReadMany{<:AbstractDict}, a, b) = get(w._raw_data, a, b)
2828

2929
# Only define setindex! for Dicts, and throw an error if the key already exists
30-
function Base.setindex!(w::DynamicQuantities.WriteOnceReadMany{<:Dict}, i, s::Symbol)
30+
function Base.setindex!(w::WriteOnceReadMany{<:AbstractDict}, i, s::Symbol)
3131
haskey(w._raw_data, s) && error("Unit $s already exists at index $(w[s])")
3232
setindex!(w._raw_data, i, s)
3333
return w

test/precompile_test/ExternalUnitRegistration.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module ExternalUnitRegistration
22

3-
using DynamicQuantities: @register_unit, @u_str, @us_str,
4-
ALL_MAPPING, ALL_SYMBOLS, DEFAULT_QUANTITY_TYPE,
5-
DEFAULT_SYMBOLIC_QUANTITY_OUTPUT_TYPE, UNIT_SYMBOLS, UNIT_MAPPING
3+
using DynamicQuantities: @register_unit, @u_str, @us_str
4+
using DynamicQuantities: ALL_MAPPING, ALL_SYMBOLS, DEFAULT_QUANTITY_TYPE
5+
using DynamicQuantities: DEFAULT_SYMBOLIC_QUANTITY_OUTPUT_TYPE, UNIT_SYMBOLS, UNIT_MAPPING
66
using Test
77

88
@register_unit Wb u"m^2*kg*s^-2*A^-1"
99

10-
@testset " Register Unit Inside a Module" begin
10+
@testset "Register Unit Inside a Module" begin
1111
for collection in (UNIT_SYMBOLS, ALL_SYMBOLS, keys(ALL_MAPPING._raw_data), keys(UNIT_MAPPING._raw_data))
1212
@test :Wb collection
1313
end

0 commit comments

Comments
 (0)