18 lines
375 B
Rust
18 lines
375 B
Rust
|
use crate::prelude::*;
|
||
|
|
||
|
use atom_syndication::Link;
|
||
|
use std::fs::OpenOptions;
|
||
|
use std::io::prelude::*;
|
||
|
|
||
|
pub fn mark_as_downloaded(link: &Link, file_name: &str) -> Result<()> {
|
||
|
let mut file = OpenOptions::new()
|
||
|
.write(true)
|
||
|
.append(true)
|
||
|
.create(true)
|
||
|
.open(file_name)
|
||
|
.unwrap();
|
||
|
|
||
|
writeln!(file, "{}", link.href)?;
|
||
|
Ok(())
|
||
|
}
|