Skip to content

Commit 646f075

Browse files
ven-kbaggepinnen
andcommitted
refactor: apply suggestions from code review
Co-authored-by: Fredrik Bagge Carlson <[email protected]>
1 parent 56eb5e7 commit 646f075

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Electrical/Digital/logic.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ function Base.show(io::IO, ::MIME"text/plain", l::Logic)
3030
elseif Int(l) == 9
3131
print(io, "DC")
3232
else
33-
print(io, "Invalid logic level")
33+
print(io, "Invalid logic level: $l")
3434
end
3535
end
3636

37-
Base.zero(l::Logic) = F0
38-
Base.zero(l::Type{Logic}) = F0
39-
Base.one(l::Logic) = F1
40-
Base.one(l::Type{Logic}) = F1
37+
Base.zero(::Logic) = F0
38+
Base.zero(::Type{Logic}) = F0
39+
Base.one(::Logic) = F1
40+
Base.one(::Type{Logic}) = F1
4141

4242
# Helpers to convert 1 and 0 to their `Logic` counterparts
4343
function Base.convert(l::Type{Logic}, i::Number)

src/Electrical/Digital/logic_vectors.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ end
2424

2525
const LogicVector = Union{StdULogicVector, StdLogicVector}
2626

27-
Base.size(l::L) where {L <: LogicVector} = size(l.logic)
27+
Base.size(l::LogicVector) = size(l.logic)
2828

29-
Base.axes(l::L) where {L <: LogicVector} = axes(l.logic)
29+
Base.axes(l::LogicVector) = axes(l.logic)
3030

3131
function Base.getindex(s::L,
3232
i::Int) where {L <: LogicVector}

0 commit comments

Comments
 (0)