Skip to content

Commit

Permalink
applied some newer clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianBeilschmidt committed Nov 3, 2021
1 parent 9b61998 commit 4d4e040
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ impl Dataset {
filename: P,
options: &[RasterCreationOption],
) -> Result<Dataset> {
Self::_create_copy(&self, driver, filename.as_ref(), options)
Self::_create_copy(self, driver, filename.as_ref(), options)
}

fn _create_copy(
Expand Down
6 changes: 3 additions & 3 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl Driver {
options: &[RasterCreationOption],
) -> Result<Dataset> {
Self::_create_with_band_type_with_options::<T>(
&self,
self,
filename.as_ref(),
size_x,
size_y,
Expand Down Expand Up @@ -149,7 +149,7 @@ impl Driver {
/// Calls `GDALDeleteDataset()`
///
pub fn delete<P: AsRef<Path>>(&self, filename: P) -> Result<()> {
Self::_delete(&self, filename.as_ref())
Self::_delete(self, filename.as_ref())
}

fn _delete(&self, filename: &Path) -> Result<()> {
Expand All @@ -175,7 +175,7 @@ impl Driver {
new_filename: P1,
old_filename: P2,
) -> Result<()> {
Self::_rename(&self, new_filename.as_ref(), old_filename.as_ref())
Self::_rename(self, new_filename.as_ref(), old_filename.as_ref())
}

fn _rename(&self, new_filename: &Path, old_filename: &Path) -> Result<()> {
Expand Down
4 changes: 2 additions & 2 deletions src/vsi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub fn create_mem_file_from_ref<P: AsRef<Path>>(
}

fn _create_mem_file_from_ref<'d>(file_name: &Path, data: &'d mut [u8]) -> Result<MemFileRef<'d>> {
let file_name_c = _path_to_c_string(&file_name)?;
let file_name_c = _path_to_c_string(file_name)?;

let handle = unsafe {
VSIFileFromMemBuffer(
Expand Down Expand Up @@ -102,7 +102,7 @@ pub fn unlink_mem_file<P: AsRef<Path>>(file_name: P) -> Result<()> {
}

fn _unlink_mem_file(file_name: &Path) -> Result<()> {
let file_name_c = _path_to_c_string(&file_name)?;
let file_name_c = _path_to_c_string(file_name)?;

let rv = unsafe { VSIUnlink(file_name_c.as_ptr()) };

Expand Down

0 comments on commit 4d4e040

Please sign in to comment.