summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2019-04-23 16:41:45 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2019-04-23 16:41:45 +0200
commitf27c2641c949ed566f2e7284a75d3004d6b3de02 (patch)
treedce6d6b38b66c7feeef901f0c659a8526b31c4ec
parent612a21368cc1a9f2a85edf9fcf305819c33780e6 (diff)
Fix: Status and Www implement Display, so they implement ToString as well
-rw-r--r--src/frontend/list.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/frontend/list.rs b/src/frontend/list.rs
index 0ebd41b..8cff146 100644
--- a/src/frontend/list.rs
+++ b/src/frontend/list.rs
@@ -23,17 +23,17 @@ impl Frontend for ListFrontend {
packages.iter().fold(Ok(()), |accu, package| {
accu.and_then(|_| {
- let status: &String = if let Some(stat) = package.status() {
- stat.deref() as &String
+ let status= if let Some(stat) = package.status() {
+ stat.deref().to_string()
} else {
- &String::from("No status")
+ String::from("No status")
}; // not optimal, but works for now.
- let url: &String = if let Some(url) = package.www() {
+ let url= if let Some(url) = package.www() {
if let Some(url) = url.first() {
- url.deref() as &String
+ url.deref().to_string()
} else {
- &String::from("")
+ String::from("")
}
} else {
String::from("")