Skip to content

Commit

Permalink
fix: lints and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tessus committed Apr 3, 2024
1 parent dd7b93f commit a7a5977
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/paste.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ impl Paste {
.unwrap_or_default()
.to_string();
let file_path = util::glob_match_file(path.clone())
.await.map_err(|_| IoError::new(IoErrorKind::Other, String::from("path is not valid")))?;
.await
.map_err(|_| IoError::new(IoErrorKind::Other, String::from("path is not valid")))?;
if file_path.is_file() && file_path.exists() {
return Err(error::ErrorConflict("file already exists\n"));
}
Expand Down Expand Up @@ -247,9 +248,7 @@ impl Paste {
.to_string());
}
}
Ok(self
.store_file(file_name, expiry_date, None, config)
.await?)
self.store_file(file_name, expiry_date, None, config).await
}

/// Writes an URL to a file in upload directory.
Expand Down

0 comments on commit a7a5977

Please sign in to comment.