summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-03-10 10:08:11 +0100
committerMatthias Beyer <matthias.beyer@atos.net>2021-03-10 10:13:06 +0100
commit9a79643ced98567ab7b0c742f0d161cb5dd43578 (patch)
tree07147e5204731c32b6c65d07f053083819c9e3ac
parentf5058c3b15e6fdf3b60cd14a65badaf4f2a056bd (diff)
Clippy fix: Remove unneeded lifetimes
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r--src/commands/endpoint_container.rs14
-rw-r--r--src/endpoint/configured.rs2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/commands/endpoint_container.rs b/src/commands/endpoint_container.rs
index 4989b26..1861cc7 100644
--- a/src/commands/endpoint_container.rs
+++ b/src/commands/endpoint_container.rs
@@ -96,26 +96,26 @@ pub async fn container(endpoint_names: Vec<String>,
}
}
-async fn top<'a>(matches: &ArgMatches, container: Container<'a>) -> Result<()> {
+async fn top(matches: &ArgMatches, container: Container<'_>) -> Result<()> {
let top = container.top(None).await?;
let hdr = crate::commands::util::mk_header(top.titles.iter().map(|s| s.as_ref()).collect());
crate::commands::util::display_data(hdr, top.processes, matches.is_present("csv"))
}
-async fn kill<'a>(matches: &ArgMatches, container: Container<'a>) -> Result<()> {
+async fn kill(matches: &ArgMatches, container: Container<'_>) -> Result<()> {
let signal = matches.value_of("signal");
container.kill(signal).await.map_err(Error::from)
}
-async fn delete<'a>(container: Container<'a>) -> Result<()> {
+async fn delete(container: Container<'_>) -> Result<()> {
container.delete().await.map_err(Error::from)
}
-async fn start<'a>(container: Container<'a>) -> Result<()> {
+async fn start(container: Container<'_>) -> Result<()> {
container.start().await.map_err(Error::from)
}
-async fn stop<'a>(matches: &ArgMatches, container: Container<'a>) -> Result<()> {
+async fn stop(matches: &ArgMatches, container: Container<'_>) -> Result<()> {
container.stop({
matches
.value_of("timeout")
@@ -127,7 +127,7 @@ async fn stop<'a>(matches: &ArgMatches, container: Container<'a>) -> Result<()>
.map_err(Error::from)
}
-async fn exec<'a>(matches: &ArgMatches, container: Container<'a>) -> Result<()> {
+async fn exec(matches: &ArgMatches, container: Container<'_>) -> Result<()> {
use std::io::Write;
use futures::TryStreamExt;
@@ -164,7 +164,7 @@ async fn exec<'a>(matches: &ArgMatches, container: Container<'a>) -> Result<()>
//
// This is the most ugly function of the whole codebase. As ugly as it is: It is simply printing
// things, nothing here is too complex code-wise (except some nested formatting stuff...)
-async fn inspect<'a>(container: Container<'a>) -> Result<()> {
+async fn inspect(container: Container<'_>) -> Result<()> {
use std::io::Write;
use itertools::Itertools;
diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs
index d6139ab..219b6f9 100644
--- a/src/endpoint/configured.rs
+++ b/src/endpoint/configured.rs
@@ -283,7 +283,7 @@ impl Endpoint {
.map(|o| o.is_some())
}
- pub async fn get_container_by_id<'a>(&'a self, id: &str) -> Result<Option<Container<'a>>> {
+ pub async fn get_container_by_id(&self, id: &str) -> Result<Option<Container<'_>>> {
if self.has_container_with_id(id).await? {
Ok(Some(self.docker.containers().get(id)))
} else {