]> git.proxmox.com Git - cargo.git/commitdiff
Remove useless lifetimes
authormcarton <cartonmartin+git@gmail.com>
Fri, 15 Jan 2016 14:51:23 +0000 (15:51 +0100)
committermcarton <cartonmartin+git@gmail.com>
Sat, 16 Jan 2016 11:42:56 +0000 (12:42 +0100)
Fix all Clippy’s needless_lifetimes warnings.

src/cargo/lib.rs
src/cargo/ops/cargo_rustc/layout.rs
src/cargo/sources/git/utils.rs

index 9e58786ca16d1ef7a141522e7b9069edcd3540f1..8a4b4338d879b1f6c4adf209c60462f366a68947 100644 (file)
@@ -241,7 +241,7 @@ pub fn version() -> String {
     })
 }
 
-fn flags_from_args<'a, T>(usage: &str, args: &[String],
+fn flags_from_args<T>(usage: &str, args: &[String],
                           options_first: bool) -> CliResult<T>
     where T: Decodable
 {
index 5ab7bb5a4fd8aee452ed56c43ad1550f7e5b7c91..6bf8b3e153dace309e91220fd9ae519025481379 100644 (file)
@@ -113,9 +113,9 @@ impl Layout {
         }
     }
 
-    pub fn dest<'a>(&'a self) -> &'a Path { &self.root }
-    pub fn deps<'a>(&'a self) -> &'a Path { &self.deps }
-    pub fn examples<'a>(&'a self) -> &'a Path { &self.examples }
+    pub fn dest(&self) -> &Path { &self.root }
+    pub fn deps(&self) -> &Path { &self.deps }
+    pub fn examples(&self) -> &Path { &self.examples }
 
     pub fn fingerprint(&self, package: &Package) -> PathBuf {
         self.fingerprint.join(&self.pkg_dir(package))
index 9973cd8a2bd630967175306005f01d8ddbd7355a..3da37717d4e370c19cf02edb8d10422125b614b7 100644 (file)
@@ -159,7 +159,7 @@ impl GitRemote {
 }
 
 impl GitDatabase {
-    fn path<'a>(&'a self) -> &'a Path {
+    fn path(&self) -> &Path {
         &self.path
     }