Skip to content

An assortment of minor changes #692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/HDF5.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ end
convert(::Type{hid_t}, attr::Attribute) = attr.id
show(io::IO, attr::Attribute) = isvalid(attr) ? print(io, "HDF5 attribute: ", name(attr)) : print(io, "HDF5 attribute (invalid)")

mutable struct Attributes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the only mutable struct -> struct audited?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't check thoroughly — I noticed it while browsing through your rename PR and this one was the only one that stood out to me as not needing to be mutable since it doesn't add a finalizer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the only candidate, though:

$ git grep 'mutable struct'
src/HDF5.jl:mutable struct File <: DataFile
src/HDF5.jl:mutable struct Group <: DataFile
src/HDF5.jl:mutable struct Properties
src/HDF5.jl:mutable struct Dataset
src/HDF5.jl:mutable struct Datatype
src/HDF5.jl:mutable struct Dataspace
src/HDF5.jl:mutable struct Attribute

struct Attributes
parent::Union{File,Group,Dataset}
end
attrs(p::Union{File,Group,Dataset}) = Attributes(p)
Expand Down