From 05e056481f0637d6be91535b5f4d7bbe82dd4a12 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Tue, 5 Dec 2017 09:28:13 +0200 Subject: [PATCH] Take advantage of trait from the generated builders. --- hammond-data/src/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hammond-data/src/parser.rs b/hammond-data/src/parser.rs index 0f69281..da04862 100644 --- a/hammond-data/src/parser.rs +++ b/hammond-data/src/parser.rs @@ -9,10 +9,10 @@ use errors::*; // TODO: Extend the support for parsing itunes extensions /// Parses a `rss::Channel` into a `NewPodcast` Struct. pub(crate) fn new_podcast(chan: &Channel, source_id: i32) -> NewPodcast { - let title = chan.title().trim().to_owned(); - let description = chan.description().trim().to_owned(); + let title = chan.title().trim(); + let description = chan.description().trim(); - let link = url_cleaner(chan.link()).to_owned(); + let link = url_cleaner(chan.link()); let x = chan.itunes_ext().map(|s| s.image()); let image_uri = if let Some(img) = x { img.map(|s| url_cleaner(s))