Skip to content

Commit 16b5618

Browse files
committed
update crate-status to inform about tree-editing capabilities
1 parent 5242aad commit 16b5618

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -390,3 +390,4 @@ unnecessary_join = "allow" # x1
390390
stable_sort_primitive = "allow" # x1
391391
no_effect_underscore_binding = "allow" # x1
392392
empty_docs = "allow"
393+
too_long_first_doc_paragraph = "allow"

crate-status.md

+2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ The top-level crate that acts as hub to all functionality provided by the `gix-*
9797
* [ ] create [signed commits and tags](https://github.com/Byron/gitoxide/issues/12)
9898
* **trees**
9999
* [x] lookup path
100+
* [x] edit
100101
* **references**
101102
* [x] peel to end
102103
* [x] ref-log access
@@ -213,6 +214,7 @@ The top-level crate that acts as hub to all functionality provided by the `gix-*
213214
* [x] tag
214215
* [x] [name validation][tagname-validation]
215216
* [x] transform borrowed to owned objects
217+
* [x] edit trees efficiently and write changes back
216218
* [x] API documentation
217219
* [ ] Some examples
218220

gix-config/src/file/access/read_only.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,10 @@ impl<'event> File<'event> {
312312
/// # Ok::<(), Box<dyn std::error::Error>>(())
313313
/// ```
314314
#[must_use]
315-
pub fn sections_by_name<'a>(&'a self, name: &'a str) -> Option<impl Iterator<Item = &file::Section<'event>> + '_> {
315+
pub fn sections_by_name<'a>(
316+
&'a self,
317+
name: &'a str,
318+
) -> Option<impl Iterator<Item = &'a file::Section<'event>> + 'a> {
316319
self.section_ids_by_name(name).ok().map(move |ids| {
317320
ids.map(move |id| {
318321
self.sections
@@ -328,7 +331,7 @@ impl<'event> File<'event> {
328331
pub fn sections_and_ids_by_name<'a>(
329332
&'a self,
330333
name: &'a str,
331-
) -> Option<impl Iterator<Item = (&file::Section<'event>, SectionId)> + '_> {
334+
) -> Option<impl Iterator<Item = (&'a file::Section<'event>, SectionId)> + 'a> {
332335
self.section_ids_by_name(name).ok().map(move |ids| {
333336
ids.map(move |id| {
334337
(
@@ -347,7 +350,7 @@ impl<'event> File<'event> {
347350
&'a self,
348351
name: &'a str,
349352
filter: &'a mut MetadataFilter,
350-
) -> Option<impl Iterator<Item = &file::Section<'event>> + '_> {
353+
) -> Option<impl Iterator<Item = &'a file::Section<'event>> + 'a> {
351354
self.section_ids_by_name(name).ok().map(move |ids| {
352355
ids.filter_map(move |id| {
353356
let s = self

gix-config/src/file/util.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl<'event> File<'event> {
118118
&'a self,
119119
section_name: &'a str,
120120
subsection_name: Option<&BStr>,
121-
) -> Result<impl ExactSizeIterator<Item = SectionId> + DoubleEndedIterator + '_, lookup::existing::Error> {
121+
) -> Result<impl ExactSizeIterator<Item = SectionId> + DoubleEndedIterator + 'a, lookup::existing::Error> {
122122
let section_name = section::Name::from_str_unchecked(section_name);
123123
let section_ids = self
124124
.section_lookup_tree
@@ -146,7 +146,7 @@ impl<'event> File<'event> {
146146
pub(crate) fn section_ids_by_name<'a>(
147147
&'a self,
148148
section_name: &'a str,
149-
) -> Result<impl Iterator<Item = SectionId> + '_, lookup::existing::Error> {
149+
) -> Result<impl Iterator<Item = SectionId> + 'a, lookup::existing::Error> {
150150
let section_name = section::Name::from_str_unchecked(section_name);
151151
match self.section_lookup_tree.get(&section_name) {
152152
Some(lookup) => {

gix-index/src/access/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl State {
215215
directory: &BStr,
216216
ignore_case: bool,
217217
lookup: &AccelerateLookup<'a>,
218-
) -> Option<&Entry> {
218+
) -> Option<&'a Entry> {
219219
lookup
220220
.icase_dirs
221221
.find(AccelerateLookup::icase_hash(directory), |dir| {

gix-submodule/src/access.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl File {
5656
) -> bool
5757
+ 'a),
5858
) -> Result<
59-
impl Iterator<Item = (&BStr, Result<bool, gix_config::value::Error>)> + 'a,
59+
impl Iterator<Item = (&'a BStr, Result<bool, gix_config::value::Error>)> + 'a,
6060
crate::is_active_platform::Error,
6161
> {
6262
let mut platform = self.is_active_platform(config, defaults)?;

gix/src/worktree/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub type Index = gix_fs::SharedFileSnapshot<gix_index::File>;
2222

2323
/// A type to represent an index which either was loaded from disk as it was persisted there, or created on the fly in memory.
2424
#[cfg(feature = "index")]
25+
#[allow(clippy::large_enum_variant)]
2526
pub enum IndexPersistedOrInMemory {
2627
/// The index as loaded from disk, and shared across clones of the owning `Repository`.
2728
Persisted(Index),

0 commit comments

Comments
 (0)