mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-24 13:47:38 +00:00
Remove unnecessary lifetimes
This commit is contained in:
parent
35e219e1f6
commit
d62bb107f2
@ -49,7 +49,7 @@ pub fn segment(_: &ArgMatches) -> Segment {
|
||||
}
|
||||
|
||||
/// Get the root directory of a git repo
|
||||
fn get_repo_root<'a>(repo: &'a Repository) -> &'a Path {
|
||||
fn get_repo_root(repo: &Repository) -> &Path {
|
||||
if repo.is_bare() {
|
||||
// Bare repos will return the repo root
|
||||
repo.path()
|
||||
|
@ -40,7 +40,7 @@ impl Segment {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_style<'a, T>(&'a mut self, style: T) -> &'a mut Segment
|
||||
pub fn set_style<T>(&mut self, style: T) -> &mut Segment
|
||||
where
|
||||
T: Into<Style>,
|
||||
{
|
||||
@ -48,7 +48,7 @@ impl Segment {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn set_value<'a, T>(&'a mut self, value: T) -> &'a mut Segment
|
||||
pub fn set_value<T>(&mut self, value: T) -> &mut Segment
|
||||
where
|
||||
T: Into<String>,
|
||||
{
|
||||
@ -56,12 +56,12 @@ impl Segment {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn set_prefix<'a>(&'a mut self, prefix: Segment) -> &'a mut Segment {
|
||||
pub fn set_prefix(&mut self, prefix: Segment) -> &mut Segment {
|
||||
self.prefix = Some(Box::new(prefix));
|
||||
self
|
||||
}
|
||||
|
||||
pub fn set_suffix<'a>(&'a mut self, suffix: Segment) -> &'a mut Segment {
|
||||
pub fn set_suffix(&mut self, suffix: Segment) -> &mut Segment {
|
||||
self.suffix = Some(Box::new(suffix));
|
||||
self
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user