rust-syndication / rss

Library for serializing the RSS web content syndication format
https://crates.io/crates/rss
Apache License 2.0
419 stars 52 forks source link

Could not find function from_url in rss::Channel #70

Closed zachschultz closed 6 years ago

zachschultz commented 6 years ago

My Cargo.toml contains:

[dependencies]
rss = "1.5"

and my small program looks like:

extern crate rss;
use rss::Channel;

fn main() {
  let channel = Channel::from_url("http://example.com/feed.xml").unwrap();
}

When trying to run cargo run I get this error: no function or associated item namedfrom_urlfound for typerss::Channelin the current scope.

Any help would be greatly appreciated, because I'm not sure why this wont work.

frewsxcv commented 6 years ago

https://github.com/rust-syndication/rss#from-a-url

You'll need to opt-in to the from_url feature:

[dependencies]
rss = { version = "1.5", features = ["from_url"] }