Skip to content

Commit dcd80d7

Browse files
committed
refactor: Remove unused fields
1 parent f9a05d1 commit dcd80d7

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

‎src/graph.rs‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ pub struct GitGraph {
3434
pub indices: HashMap<Oid, usize>,
3535
/// All detected branches and tags, including merged and deleted
3636
pub all_branches: Vec<BranchInfo>,
37-
/// Indices of all real (still existing) branches in `all_branches`
38-
pub branches: Vec<usize>,
39-
/// Indices of all tags in `all_branches`
40-
pub tags: Vec<usize>,
4137
/// The current HEAD
4238
pub head: HeadInfo,
4339
}
@@ -155,37 +151,11 @@ impl GitGraph {
155151
}
156152
}
157153

158-
let branches = all_branches
159-
.iter()
160-
.enumerate()
161-
.filter_map(|(idx, br)| {
162-
if !br.is_merged && !br.is_tag {
163-
Some(idx)
164-
} else {
165-
None
166-
}
167-
})
168-
.collect();
169-
170-
let tags = all_branches
171-
.iter()
172-
.enumerate()
173-
.filter_map(|(idx, br)| {
174-
if !br.is_merged && br.is_tag {
175-
Some(idx)
176-
} else {
177-
None
178-
}
179-
})
180-
.collect();
181-
182154
Ok(GitGraph {
183155
repository,
184156
commits: filtered_commits,
185157
indices: filtered_indices,
186158
all_branches,
187-
branches,
188-
tags,
189159
head,
190160
})
191161
}

0 commit comments

Comments
 (0)