Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mre committed Nov 12, 2024
1 parent 1206584 commit e70ecd9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lychee-lib/src/types/cookies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ impl CookieJar {
/// # Errors
///
/// This function will return an error if
/// - the file cannot be opened (except for NotFound) or
/// - the file cannot be opened (except for `NotFound`) or
/// - if the file is not valid JSON in either new or legacy format
pub fn load(path: PathBuf) -> Result<Self> {
match std::fs::File::open(&path).map(std::io::BufReader::new) {
Ok(mut reader) => {
info!("Loading cookies from {}", path.display());

// Try loading with new format first, fall back to legacy format
#[allow(clippy::single_match_else)]
let store = match cookie_store::serde::json::load(&mut reader) {
Ok(store) => store,
Err(_) => {
Expand Down

0 comments on commit e70ecd9

Please sign in to comment.