Skip to content

Commit

Permalink
fix show for custom callback functors (#101)
Browse files Browse the repository at this point in the history
* fix custom callback functors

* add comment
  • Loading branch information
SimonDanisch authored Nov 7, 2022
1 parent 2e84e35 commit c2156ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Observables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function Base.show(io::IO, obsf::ObserverFunction)
io = IOContext(io, :compact => true)
showdflt(io, @nospecialize(f), obs) = print(io, "ObserverFunction `", f, "` operating on ", obs)

nm = string(nameof(obsf.f))
nm = string(obsf.f) # 1.6 doesn't support nameof(some_struct), and also nameof(f) == Symbol(string(f))?

if !occursin('#', nm)
showdflt(io, obsf.f, obsf.observable)
Expand Down

0 comments on commit c2156ff

Please sign in to comment.