You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As was done in a recently merged here as part of #155 for WktWriter, we need to remove pub on srid and dim fields, making it an internal implementation detail. Instead, there should be an extra writer constructor, e.g. WktWriter::with_opts(&mut out, dialect, dims, srid) that takes all the needed options.
This makes access cleaner, and removes a potential bug of dynamically changing srid or dimensions during processing. Unless of course the writer should support their dynamic modification, but even in that case it should be a function, not external variable access.
As was done in a recently merged here as part of #155 for
WktWriter
, we need to removepub
onsrid
anddim
fields, making it an internal implementation detail. Instead, there should be an extra writer constructor, e.g.WktWriter::with_opts(&mut out, dialect, dims, srid)
that takes all the needed options.This makes access cleaner, and removes a potential bug of dynamically changing srid or dimensions during processing. Unless of course the writer should support their dynamic modification, but even in that case it should be a function, not external variable access.
cc: @pka @Oreilles
The text was updated successfully, but these errors were encountered: