Skip to content

Commit 3e1f7a3

Browse files
committed
FileCreate.clone() -> FileCreate.copy()
1 parent 01d5003 commit 3e1f7a3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

hdf5-rs/src/hl/plist/file_create.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,6 @@ impl PartialEq for FileCreate {
8888

8989
impl Eq for FileCreate {}
9090

91-
impl Clone for FileCreate {
92-
fn clone(&self) -> Self {
93-
unsafe { self.deref().clone().cast() }
94-
}
95-
}
96-
9791
/// Size of the offsets and lengths used in a file.
9892
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
9993
pub struct SizeofInfo {
@@ -400,6 +394,10 @@ impl FileCreate {
400394
Self::from_id(h5try!(H5Pcreate(*H5P_FILE_CREATE)))
401395
}
402396

397+
pub fn copy(&self) -> Result<Self> {
398+
Ok(unsafe { self.deref().copy()?.cast() })
399+
}
400+
403401
pub fn build() -> FileCreateBuilder {
404402
FileCreateBuilder::new()
405403
}

0 commit comments

Comments
 (0)