Skip to content

Commit f71e74c

Browse files
committed
Derive Clone for all high-level types
1 parent 3e1f7a3 commit f71e74c

File tree

10 files changed

+10
-0
lines changed

10 files changed

+10
-0
lines changed

hdf5-rs/src/hl/container.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ impl<'a> Writer<'a> {
386386
}
387387

388388
#[repr(transparent)]
389+
#[derive(Clone)]
389390
pub struct Container(Handle);
390391

391392
impl ObjectClass for Container {

hdf5-rs/src/hl/dataset.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use crate::internal_prelude::*;
2222

2323
/// Represents the HDF5 dataset object.
2424
#[repr(transparent)]
25+
#[derive(Clone)]
2526
pub struct Dataset(Handle);
2627

2728
impl ObjectClass for Dataset {

hdf5-rs/src/hl/datatype.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ macro_rules! be_le {
4646

4747
/// Represents the HDF5 datatype object.
4848
#[repr(transparent)]
49+
#[derive(Clone)]
4950
pub struct Datatype(Handle);
5051

5152
impl ObjectClass for Datatype {

hdf5-rs/src/hl/file.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use crate::internal_prelude::*;
1818

1919
/// Represents the HDF5 file object.
2020
#[repr(transparent)]
21+
#[derive(Clone)]
2122
pub struct File(Handle);
2223

2324
impl ObjectClass for File {

hdf5-rs/src/hl/group.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use crate::internal_prelude::*;
1313

1414
/// Represents the HDF5 group object.
1515
#[repr(transparent)]
16+
#[derive(Clone)]
1617
pub struct Group(Handle);
1718

1819
impl ObjectClass for Group {

hdf5-rs/src/hl/location.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use crate::internal_prelude::*;
1212

1313
/// Named location (file, group, dataset, named datatype).
1414
#[repr(transparent)]
15+
#[derive(Clone)]
1516
pub struct Location(Handle);
1617

1718
impl ObjectClass for Location {

hdf5-rs/src/hl/object.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use crate::internal_prelude::*;
66

77
/// Any HDF5 object that can be referenced through an identifier.
88
#[repr(transparent)]
9+
#[derive(Clone)]
910
pub struct Object(Handle);
1011

1112
impl ObjectClass for Object {

hdf5-rs/src/hl/plist.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pub mod file_create;
1313

1414
/// Represents the HDF5 property list.
1515
#[repr(transparent)]
16+
#[derive(Clone)]
1617
pub struct PropertyList(Handle);
1718

1819
impl ObjectClass for PropertyList {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use crate::internal_prelude::*;
2828

2929
/// File creation properties.
3030
#[repr(transparent)]
31+
#[derive(Clone)]
3132
pub struct FileCreate(Handle);
3233

3334
impl ObjectClass for FileCreate {

hdf5-rs/src/hl/space.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use crate::internal_prelude::*;
1414

1515
/// Represents the HDF5 dataspace object.
1616
#[repr(transparent)]
17+
#[derive(Clone)]
1718
pub struct Dataspace(Handle);
1819

1920
impl ObjectClass for Dataspace {

0 commit comments

Comments
 (0)