mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-05 20:55:05 +00:00
index: use name() instead of direct field access
This commit is contained in:
parent
e5c8252fb4
commit
30984b1505
2 changed files with 4 additions and 4 deletions
|
@ -153,7 +153,7 @@ impl MutableIndexSegment {
|
|||
continue;
|
||||
}
|
||||
let own_ancestor = maybe_own_ancestor.as_ref().unwrap();
|
||||
if own_ancestor.name == other_ancestor.name {
|
||||
if own_ancestor.name() == other_ancestor.name() {
|
||||
break;
|
||||
}
|
||||
if own_ancestor.as_composite().num_commits()
|
||||
|
@ -179,9 +179,9 @@ impl MutableIndexSegment {
|
|||
let mut buf = vec![];
|
||||
|
||||
if let Some(parent_file) = &self.parent_file {
|
||||
buf.write_u32::<LittleEndian>(parent_file.name.len() as u32)
|
||||
buf.write_u32::<LittleEndian>(parent_file.name().len() as u32)
|
||||
.unwrap();
|
||||
buf.write_all(parent_file.name.as_bytes()).unwrap();
|
||||
buf.write_all(parent_file.name().as_bytes()).unwrap();
|
||||
} else {
|
||||
buf.write_u32::<LittleEndian>(0).unwrap();
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ impl CommitLookupEntry<'_> {
|
|||
pub(super) struct ReadonlyIndexSegment {
|
||||
parent_file: Option<Arc<ReadonlyIndexSegment>>,
|
||||
pub(super) num_parent_commits: u32,
|
||||
pub(super) name: String,
|
||||
name: String,
|
||||
pub(super) commit_id_length: usize,
|
||||
pub(super) change_id_length: usize,
|
||||
commit_graph_entry_size: usize,
|
||||
|
|
Loading…
Reference in a new issue