mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-04-01 09:35:37 +00:00
show bytes as description, implement format bytes trait
This commit is contained in:
parent
d05b15c7a3
commit
f49ed0e11b
5 changed files with 66 additions and 13 deletions
|
|
@ -59,7 +59,7 @@ impl Rss {
|
|||
&mut self,
|
||||
infohash: &str,
|
||||
title: &str,
|
||||
description: Option<&str>,
|
||||
description: Option<String>,
|
||||
pub_date: Option<&str>,
|
||||
) -> Result<()> {
|
||||
self.file.write_all(
|
||||
|
|
@ -72,7 +72,7 @@ impl Rss {
|
|||
)?;
|
||||
if let Some(s) = description {
|
||||
self.file.write_all(b"<description>")?;
|
||||
self.file.write_all(escape(s).as_bytes())?;
|
||||
self.file.write_all(escape(&s).as_bytes())?;
|
||||
self.file.write_all(b"</description>")?
|
||||
}
|
||||
if let Some(s) = pub_date {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue