Skip to content

Commit d25fbae

Browse files
committed
fix: Add Copy to Data, BlobRef and TreeRefIter
1 parent f984c4c commit d25fbae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gix-object/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub enum Kind {
5353
Tag,
5454
}
5555
/// A chunk of any [`data`][BlobRef::data].
56-
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
56+
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
5757
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5858
pub struct BlobRef<'a> {
5959
/// The bytes themselves.
@@ -225,7 +225,7 @@ pub struct TreeRef<'a> {
225225
}
226226

227227
/// A directory snapshot containing files (blobs), directories (trees) and submodules (commits), lazily evaluated.
228-
#[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
228+
#[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
229229
pub struct TreeRefIter<'a> {
230230
/// The directories and files contained in this tree.
231231
data: &'a [u8],
@@ -249,7 +249,7 @@ impl Tree {
249249
}
250250

251251
/// A borrowed object using a slice as backing buffer, or in other words a bytes buffer that knows the kind of object it represents.
252-
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
252+
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
253253
pub struct Data<'a> {
254254
/// kind of object
255255
pub kind: Kind,

0 commit comments

Comments
 (0)