diff options
Diffstat (limited to 'src/actions.rs')
| -rw-r--r-- | src/actions.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/actions.rs b/src/actions.rs index c3ed2ac..c943769 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -66,11 +66,9 @@ pub fn update_subscription(sub: &mut Subscription) -> Result<()> { let resp = reqwest::get(&sub.url)?; let podcast = Podcast::from(Channel::read_from(BufReader::new(resp))?); - let mut filename = String::from(podcast.title()); - filename.push_str(".xml"); - let mut podcast_rss_path = get_xml_dir()?; - podcast_rss_path.push(&filename); + podcast_rss_path.push(podcast.title()); + podcast_rss_path.set_extension("xml"); let file = File::create(&podcast_rss_path)?; (*podcast).write_to(BufWriter::new(file))?; |
