@@ -23,8 +23,8 @@ impl FromStr for Feed {
2323impl ToString for Feed {
2424 fn to_string ( & self ) -> String {
2525 match self {
26- & Feed :: Atom ( ref atom_feed) => atom_feed. to_string ( ) ,
27- & Feed :: RSS ( ref rss_channel) => rss_channel. to_string ( ) ,
26+ Feed :: Atom ( atom_feed) => atom_feed. to_string ( ) ,
27+ Feed :: RSS ( rss_channel) => rss_channel. to_string ( ) ,
2828 }
2929 }
3030}
@@ -44,7 +44,7 @@ mod test {
4444 let mut atom_string = String :: new ( ) ;
4545 file. read_to_string ( & mut atom_string) . unwrap ( ) ;
4646 let feed = Feed :: from_str ( & atom_string) . unwrap ( ) ;
47- assert ! ( feed. to_string( ) . len ( ) > 0 ) ;
47+ assert ! ( ! feed. to_string( ) . is_empty ( ) ) ;
4848 }
4949
5050 // Source: https://github.com/frewsxcv/rust-rss/blob/master/src/lib.rs
@@ -54,7 +54,7 @@ mod test {
5454 let mut rss_string = String :: new ( ) ;
5555 file. read_to_string ( & mut rss_string) . unwrap ( ) ;
5656 let rss = Feed :: from_str ( & rss_string) . unwrap ( ) ;
57- assert ! ( rss. to_string( ) . len ( ) > 0 ) ;
57+ assert ! ( ! rss. to_string( ) . is_empty ( ) ) ;
5858 }
5959
6060 // Source: https://github.com/vtduncan/rust-atom/blob/master/src/lib.rs
@@ -66,11 +66,11 @@ mod test {
6666
6767 let entry = atom_syndication:: EntryBuilder :: default ( )
6868 . title ( "My first post!" )
69- . content (
69+ . content ( Some (
7070 atom_syndication:: ContentBuilder :: default ( )
71- . value ( "This is my first post" . to_string ( ) )
71+ . value ( Some ( "This is my first post" . to_string ( ) ) )
7272 . build ( ) ,
73- )
73+ ) )
7474 . build ( ) ;
7575
7676 let feed = atom_syndication:: FeedBuilder :: default ( )
@@ -86,9 +86,9 @@ mod test {
8686 #[ test]
8787 fn test_rss_to_string ( ) {
8888 let item = rss:: ItemBuilder :: default ( )
89- . title ( "My first post!" . to_string ( ) )
90- . link ( "http://myblog.com/post1" . to_string ( ) )
91- . description ( "This is my first post" . to_string ( ) )
89+ . title ( Some ( "My first post!" . to_string ( ) ) )
90+ . link ( Some ( "http://myblog.com/post1" . to_string ( ) ) )
91+ . description ( Some ( "This is my first post" . to_string ( ) ) )
9292 . build ( ) ;
9393
9494 let channel = rss:: ChannelBuilder :: default ( )
0 commit comments