Skip to content

Commit

Permalink
refactor: Remove to remove unneeded mutability (starship#577)
Browse files Browse the repository at this point in the history
Removed a couple of unneeded `mut`s that were pointed out by `cargo
check`.
  • Loading branch information
andytom authored and matchai committed Oct 24, 2019
1 parent e34b362 commit e0c90a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/git_branch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::configs::git_branch::GitBranchConfig;
/// Will display the branch name if the current directory is a git repo
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
let mut module = context.new_module("git_branch");
let mut config = GitBranchConfig::try_load(module.config);
let config = GitBranchConfig::try_load(module.config);
module.set_style(config.style);

module.get_prefix().set_value("on ");
Expand Down
2 changes: 1 addition & 1 deletion src/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub fn get_prompt(context: Context) -> String {
.collect::<Vec<Module>>(); // Remove segments set to `None`

let mut print_without_prefix = true;
let mut printable = modules.iter();
let printable = modules.iter();

for module in printable {
// Skip printing the prefix of a module after the line_break
Expand Down

0 comments on commit e0c90a6

Please sign in to comment.