Created
August 22, 2019 16:05
-
-
Save rust-play/7d7d520e37a3dacb51eeba9c14bc6f55 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::Write; | |
pub fn feed_type_post_body(kind: bool) -> for<'w> fn(into: &'w mut dyn Write) -> Box<dyn Write + 'w> { | |
match kind { | |
true => feed_rss_post_body, | |
false => feed_rss_post_body, | |
} | |
} | |
pub fn feed_rss_post_body<'w>(into: &'w mut dyn Write) -> Box<dyn Write + 'w> { | |
Box::new(into) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment