mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-10 14:16:24 +03:00
tree: inline legacy_id()
into its sole caller
This commit is contained in:
parent
d9ce70c176
commit
64b47bae56
@ -282,7 +282,7 @@ impl MergedTree {
|
||||
/// The tree's id
|
||||
pub fn id(&self) -> MergedTreeId {
|
||||
match self {
|
||||
MergedTree::Legacy(tree) => tree.legacy_id(),
|
||||
MergedTree::Legacy(tree) => MergedTreeId::Legacy(tree.id().clone()),
|
||||
MergedTree::Merge(merge) => MergedTreeId::Merge(merge.map(|tree| tree.id().clone())),
|
||||
}
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ use thiserror::Error;
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::backend::{
|
||||
BackendError, ConflictId, FileId, MergedTreeId, ObjectId, TreeEntriesNonRecursiveIterator,
|
||||
TreeEntry, TreeId, TreeValue,
|
||||
BackendError, ConflictId, FileId, ObjectId, TreeEntriesNonRecursiveIterator, TreeEntry, TreeId,
|
||||
TreeValue,
|
||||
};
|
||||
use crate::files::MergeResult;
|
||||
use crate::matchers::{EverythingMatcher, Matcher};
|
||||
@ -108,10 +108,6 @@ impl Tree {
|
||||
&self.id
|
||||
}
|
||||
|
||||
pub fn legacy_id(&self) -> MergedTreeId {
|
||||
MergedTreeId::Legacy(self.id.clone())
|
||||
}
|
||||
|
||||
pub fn data(&self) -> &backend::Tree {
|
||||
&self.data
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user