History

refactor

Sebastian Thiel committed 5 years ago

Commit a4d5f991 parent 11018e18 files · +26 −26Browse files

Showing the changes to git-object/src/mutable (1 of 8 files). Show all

Unified · Split

git-object/src/mutable/tree.rs+4−4
@@ -1,4 +1,4 @@
1−use crate::{mutable::SPACE, tree::Mode};
1+use crate::{mutable::SPACE, tree::EntryMode};
22 use bstr::{BString, ByteSlice};
33 use quick_error::quick_error;
44 use std::cmp::Ordering;
@@ -34,7 +34,7 @@ pub struct Tree { · 29 unmodified lines
3434 #[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
3535 pub struct Entry {
3636 /// The kind of object to which `oid` is pointing to.
37− pub mode: Mode,
37+ pub mode: EntryMode,
3838 /// The name of the file in the parent tree.
3939 pub filename: BString,
4040 /// The id of the object representing the entry.
@@ -56,10 +56,10 @@ impl Ord for Entry { · 15 unmodified lines
5656 }
5757
5858 /// Serialization
59−impl Mode {
59+impl EntryMode {
6060 /// Return the representation as used in the git internal format.
6161 pub fn as_bytes(&self) -> &'static [u8] {
62− use Mode::*;
62+ use EntryMode::*;
6363 match self {
6464 Tree => b"40000",
6565 Blob => b"100644",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t