forked from mirrors/jj
index: implement AsCompositeIndex for CompositeIndex, not for &CompositeIndex
Just a minor code cleanup. We still need Index for &CompositeIndex because the type is unsized, and unsized type cannot be converted to another dyn reference.
This commit is contained in:
parent
243675b793
commit
3d0952b316
1 changed files with 2 additions and 1 deletions
|
@ -399,12 +399,13 @@ impl CompositeIndex {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsCompositeIndex for &CompositeIndex {
|
||||
impl AsCompositeIndex for CompositeIndex {
|
||||
fn as_composite(&self) -> &CompositeIndex {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
// In revset engine, we need to convert &CompositeIndex to &dyn Index.
|
||||
impl Index for &CompositeIndex {
|
||||
/// Suppose the given `commit_id` exists, returns the minimum prefix length
|
||||
/// to disambiguate it. The length to be returned is a number of hexadecimal
|
||||
|
|
Loading…
Reference in a new issue