forked from mirrors/jj
tests: remove index downcast helpers called only by as_<type>_composite()
I'm going to rename the impl types, and I don't want to think about the names of these downcast functions.
This commit is contained in:
parent
5f6e28c8cf
commit
cee69d1665
1 changed files with 4 additions and 10 deletions
|
@ -443,26 +443,20 @@ fn create_n_commits(
|
|||
tx.commit()
|
||||
}
|
||||
|
||||
fn as_readonly_wrapper(repo: &Arc<ReadonlyRepo>) -> &ReadonlyIndexWrapper {
|
||||
fn as_readonly_composite(repo: &Arc<ReadonlyRepo>) -> CompositeIndex<'_> {
|
||||
repo.readonly_index()
|
||||
.as_any()
|
||||
.downcast_ref::<ReadonlyIndexWrapper>()
|
||||
.unwrap()
|
||||
.as_composite()
|
||||
}
|
||||
|
||||
fn as_readonly_composite(repo: &Arc<ReadonlyRepo>) -> CompositeIndex<'_> {
|
||||
as_readonly_wrapper(repo).as_composite()
|
||||
}
|
||||
|
||||
fn as_mutable_impl(repo: &MutableRepo) -> &MutableIndexImpl {
|
||||
fn as_mutable_composite(repo: &MutableRepo) -> CompositeIndex<'_> {
|
||||
repo.mutable_index()
|
||||
.as_any()
|
||||
.downcast_ref::<MutableIndexImpl>()
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
fn as_mutable_composite(repo: &MutableRepo) -> CompositeIndex<'_> {
|
||||
as_mutable_impl(repo).as_composite()
|
||||
.as_composite()
|
||||
}
|
||||
|
||||
fn commits_by_level(repo: &Arc<ReadonlyRepo>) -> Vec<u32> {
|
||||
|
|
Loading…
Reference in a new issue