Skip to content

Commit

Permalink
Merge pull request GitoxideLabs#1721 from EliahKagan/run-ci/dirwalk-o…
Browse files Browse the repository at this point in the history
…ptions

Fix a non-"set" `dirwalk::Options` method that took `self` by reference
  • Loading branch information
Byron authored Dec 11, 2024
2 parents 3e63721 + c0f4da5 commit cd9060a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions gix/src/dirwalk/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ impl Options {
self
}
/// Controls the way untracked files are emitted. By default, this is happening immediately and without any simplification.
pub fn emit_untracked(mut self, toggle: EmissionMode) -> Self {
self.emit_untracked = toggle;
pub fn emit_untracked(mut self, mode: EmissionMode) -> Self {
self.emit_untracked = mode;
self
}
/// Like [`emit_untracked()`](Self::emit_untracked), but only requires a mutably borrowed instance.
pub fn set_emit_untracked(&mut self, toggle: EmissionMode) -> &mut Self {
self.emit_untracked = toggle;
pub fn set_emit_untracked(&mut self, mode: EmissionMode) -> &mut Self {
self.emit_untracked = mode;
self
}
/// If `toggle` is `true`, emit empty directories as well. Note that a directory also counts as empty if it has any
Expand Down Expand Up @@ -173,15 +173,15 @@ impl Options {
/// if `true` it will be excluded as the symlink is considered a directory.
///
/// In other words, for Git compatibility this flag should be `false`, the default, for `git2` compatibility it should be `true`.
pub fn symlinks_to_directories_are_ignored_like_directories(&mut self, toggle: bool) -> &mut Self {
pub fn symlinks_to_directories_are_ignored_like_directories(mut self, toggle: bool) -> Self {
self.symlinks_to_directories_are_ignored_like_directories = toggle;
self
}

/// Like [`symlinks_to_directories_are_ignored_like_directories()`](Self::symlinks_to_directories_are_ignored_like_directories),
/// but only requires a mutably borrowed instance.
pub fn set_symlinks_to_directories_are_ignored_like_directories(&mut self, value: bool) -> &mut Self {
self.symlinks_to_directories_are_ignored_like_directories = value;
pub fn set_symlinks_to_directories_are_ignored_like_directories(&mut self, toggle: bool) -> &mut Self {
self.symlinks_to_directories_are_ignored_like_directories = toggle;
self
}
}

0 comments on commit cd9060a

Please sign in to comment.