Showing the changes to git-object/src/mutable (1 of 8 files). Show all
Unified · Split
| @@ -1,4 +1,4 @@ | |||
| 1 | use crate::{mutable::SPACE, tree::Mode}; | 1 | use crate::{mutable::SPACE, tree::EntryMode}; |
| 2 | use bstr::{BString, ByteSlice}; | 2 | use bstr::{BString, ByteSlice}; |
| 3 | use quick_error::quick_error; | 3 | use quick_error::quick_error; |
| 4 | use std::cmp::Ordering; | 4 | use std::cmp::Ordering; |
| @@ -34,7 +34,7 @@ pub struct Tree { · 29 unmodified lines | |||
| 34 | #[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))] | 34 | #[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))] |
| 35 | pub struct Entry { | 35 | pub struct Entry { |
| 36 | /// The kind of object to which `oid` is pointing to. | 36 | /// The kind of object to which `oid` is pointing to. |
| 37 | pub mode: Mode, | 37 | pub mode: EntryMode, |
| 38 | /// The name of the file in the parent tree. | 38 | /// The name of the file in the parent tree. |
| 39 | pub filename: BString, | 39 | pub filename: BString, |
| 40 | /// The id of the object representing the entry. | 40 | /// The id of the object representing the entry. |
| @@ -56,10 +56,10 @@ impl Ord for Entry { · 15 unmodified lines | |||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | /// Serialization | 58 | /// Serialization |
| 59 | impl Mode { | 59 | impl EntryMode { |
| 60 | /// Return the representation as used in the git internal format. | 60 | /// Return the representation as used in the git internal format. |
| 61 | pub fn as_bytes(&self) -> &'static [u8] { | 61 | pub fn as_bytes(&self) -> &'static [u8] { |
| 62 | use Mode::*; | 62 | use EntryMode::*; |
| 63 | match self { | 63 | match self { |
| 64 | Tree => b"40000", | 64 | Tree => b"40000", |
| 65 | Blob => b"100644", | 65 | Blob => b"100644", |