From b1156aa73ba729163d607c6c621035bce8128f2b Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Fri, 6 May 2016 23:23:39 -0400 Subject: [PATCH] Update URL to 1.1 --- Cargo.toml | 2 +- README.md | 2 +- src/lib.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 32e6be1b..3e439dfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ chrono = "0.2" curl = "0.2" log = "0.3" quick-xml = "0.2" -url = "0.5" +url = "1.1" [features] default = [] diff --git a/README.md b/README.md index 521aa903..c95a52f9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Crates.io](https://img.shields.io/crates/v/feed.svg?style=flat-square)](https://crates.io/crates/feed)[![API Documentation](https://img.shields.io/badge/doc-rust-b7410e.svg?style=flat-square)](http://red-oxide.github.io/feed) -[![Build Status](https://img.shields.io/travis/red-oxide/feed.svg?style=flat-square)](https://travis-ci.org/red-oxide/feed)[![Clippy Linting Result](https://clippy.bashy.io/github/red-oxide/feed/master/badge.svg?style=flat-square)](https://clippy.bashy.io/github/red-oxide/feed/master/log)[![Coverage Status](https://img.shields.io/coveralls/red-oxide/feed.svg?style=flat-square)](https://coveralls.io/github/red-oxide/feed?branch=master) +[![Build Status](https://img.shields.io/travis/red-oxide/feed.svg?style=flat-square)](https://travis-ci.org/red-oxide/feed)[![Clippy Linting Result](https://clippy.bashy.io/github/red-oxide/feed/master/badge.svg?style=flat-square)](https://clippy.bashy.io/github/red-oxide/feed/master/log) Library for creating rss feeds and parsing rss feeds from an URL and retrieving the elements diff --git a/src/lib.rs b/src/lib.rs index bb9b0b8e..1e287c7d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -208,11 +208,11 @@ impl FeedBuilder { /// } /// ``` pub fn read_from_url(&mut self, feed_url: Url) -> &mut FeedBuilder { - if !feed_url.serialize().as_str().ends_with(".xml") { + if !feed_url.as_str().ends_with(".xml") { panic!(errors::missing_xml_error()); } let response = http::handle() - .get(feed_url.serialize()) + .get(feed_url.into_string()) .exec() .expect(errors::response_error()); let body = response.get_body();