Closed metasim closed 9 months ago
I did some additional research into GDALAttributeGetDataType, and I'm not seeing anything indicating a clone-like operation is supported by the C API. Furthermore, while the C++ API implements the equality operator, I can't find a corresponding C API version (but perhaps it's elsewhere in the API). Given all that, my suggested fix to this is changing #[derive(Clone, Debug, PartialEq, Eq)]
to #[derive(Debug)]
. No tests fail after doing so.
Yup, that matches my understanding of the GDAL API.
ExtenedDataType
is defined thus:https://github.com/georust/gdal/blob/f638618d7b2212eee04d852ce4365c7c6da038e4/src/raster/mdarray.rs#L613-L617
Due to the
derive
'dClone
, you can get undefined behavior (UB) in the following way (results inSIGSEGV
):Arguably,
PartialEq
andEq
should not bederive
either, but it's not UB.