diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2021-01-13 09:30:52 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-01-15 23:21:39 +0100 |
commit | 309537c02291da38e3642fc3f3ccf5df34ac98f3 (patch) | |
tree | 9152014585fb3f780bf023e8d9cd16f463398185 /src/endpoint | |
parent | fe147c2eff932add6765bce6905cf2296f0e64ff (diff) |
Fix clippy: called `.as_ref().map(String::deref)` on an Option value. This can be done more directly by calling `msg.as_deref()` instead
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/endpoint')
-rw-r--r-- | src/endpoint/configured.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs index bd36a09..e6a1667 100644 --- a/src/endpoint/configured.rs +++ b/src/endpoint/configured.rs @@ -12,7 +12,6 @@ use std::fmt::{Debug, Formatter}; use std::path::PathBuf; use std::str::FromStr; use std::sync::Arc; -use std::ops::Deref; use anyhow::Context; use anyhow::Error; @@ -484,7 +483,7 @@ impl<'a> ExecutedContainer<'a> { let err = anyhow!("Error during container run:\n\tMessage: '{msg}'\n\tConnect using\n\n\t\t`docker --host {uri} exec -it {container_id} /bin/bash`\n\n\tto debug.", container_id = self.create_info.id, uri = self.endpoint.uri(), - msg = msg.as_ref().map(String::deref).unwrap_or(""), + msg = msg.as_deref().unwrap_or(""), ); // error because the container errored |