Open metasim opened 1 year ago
yes thats right. It was probably overlooked at some point. We could introduce something as an OwnedRasterband.... However you don't even need to mutate something on purpose. Using RasterIO can (and will in many cases) modify some global variables.
This is how I'd propose we solve it (assumes foreign-types
crate applied to Rasterband
.
Currently, the following compiles, but the test fails:
Given we never request a mutable reference to
Dataset
, one could argue you should never be able to get a mutable reference to an owned, constituent component of theDataset
, as we have done here.