-
-
Notifications
You must be signed in to change notification settings - Fork 386
Closed
Labels
acknowledgedan issue is accepted as shortcoming to be fixedan issue is accepted as shortcoming to be fixedhelp wantedExtra attention is neededExtra attention is needed
Description
Current behavior 😯
Hi,
I just saw today that the Setters for the Diff-Options in gix/src/diff.rs
has the same implementation for the no_locations
and track_filename
:
Lines 67 to 78 in 5f9de52
impl Options { | |
/// Do not keep track of filepaths at all, which will leave all `location` fields empty. | |
pub fn no_locations(&mut self) -> &mut Self { | |
self.location = Some(Location::FileName); | |
self | |
} | |
/// Keep track of file-names, which makes `location` fields usable with the filename of the changed item. | |
pub fn track_filename(&mut self) -> &mut Self { | |
self.location = Some(Location::FileName); | |
self | |
} |
The doc for the no_locations
method says Do not keep track of filepaths at all [...]
, for the track_filename
it says Keep track of [...]
.
Expected behavior 🤔
Based on the documentation of the no_locations
method I would expect an impl like this:
/// Do not keep track of filepaths at all, which will leave all `location` fields empty.
pub fn no_locations(&mut self) -> &mut Self {
self.location = None;
self
}
Git behavior
/
Steps to reproduce 🕹
No response
Metadata
Metadata
Assignees
Labels
acknowledgedan issue is accepted as shortcoming to be fixedan issue is accepted as shortcoming to be fixedhelp wantedExtra attention is neededExtra attention is needed