diff --git a/CHANGES.md b/CHANGES.md index e42dd5da..e108cb31 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,10 @@ # Changes ## Unreleased +- `Dataset::close` now consumes `self` + + - + - Fixed build error with GDAL 3.1 - diff --git a/src/dataset.rs b/src/dataset.rs index e02487da..788b136d 100644 --- a/src/dataset.rs +++ b/src/dataset.rs @@ -429,7 +429,7 @@ impl Dataset { /// See [`GDALClose`]. /// /// Note: on GDAL versions older than 3.7, this function always succeeds. - pub fn close(&mut self) -> Result<()> { + pub fn close(self) -> Result<()> { #[cfg(any(all(major_ge_3, minor_ge_7), major_ge_4))] { let rv = unsafe { gdal_sys::GDALClose(self.c_dataset) };