1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-28 07:46:28 +00:00

Remove unnecessary lifetimes

This commit is contained in:
Matan Kushner 2019-04-12 19:18:47 -04:00
parent 35e219e1f6
commit d62bb107f2
No known key found for this signature in database
GPG Key ID: 4B98C3A8949CA8A4
2 changed files with 5 additions and 5 deletions

View File

@ -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()

View File

@ -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
}