m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-17 17:43:37 -05:00
Many many many changes, honestly just read the release notes
This commit is contained in:
Sergio
2025-02-28 20:43:49 +02:00
committed by GitHub
parent b12acba745
commit 0f9c5d1466
141 changed files with 4527 additions and 5848 deletions

13
src/utils/link.rs Normal file
View File

@@ -0,0 +1,13 @@
use std::str::FromStr;
use http_link::parse_link_header;
use reqwest::Url;
use crate::error;
pub fn parse_link(link: &str, base: &str) -> String {
match parse_link_header(link, &Url::from_str(base).unwrap()) {
Ok(l) => l[0].target.to_string(),
Err(e) => error!("Failed to parse link! {}", e),
}
}