mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-16 10:05:13 +00:00
refactor: Remove to remove unneeded mutability (#577)
Removed a couple of unneeded `mut`s that were pointed out by `cargo check`.
This commit is contained in:
parent
e34b3622f3
commit
e0c90a6502
@ -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 ");
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user