Skip to content

Commit 25922e5

Browse files
committed
Run cargo fmt
1 parent 9ad9195 commit 25922e5

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/webserver/database/sqlpage_functions/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ mod function_definition_macro;
22
mod function_traits;
33
pub(super) mod functions;
44
mod http_fetch_request;
5-
mod url_parameters;
65
mod s3;
6+
mod url_parameters;
77

88
use sqlparser::ast::FunctionArg;
99

src/webserver/database/sqlpage_functions/s3.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ pub(super) async fn upload_to_s3<'a>(
2525
let web_root = &config.web_root;
2626
let full_path = web_root.join(file_path);
2727
if !full_path.starts_with(web_root) {
28-
anyhow::bail!("Security violation: Access denied to file outside web root");
28+
anyhow::bail!("Security violation: Access denied to file outside web root");
2929
}
30-
tokio::fs::read(&full_path).await.map_err(|e| {
31-
log::error!("Failed to read file {}: {}", full_path.display(), e);
32-
e
33-
}).with_context(|| format!("Unable to read file {}", full_path.display()))?
30+
tokio::fs::read(&full_path)
31+
.await
32+
.map_err(|e| {
33+
log::error!("Failed to read file {}: {}", full_path.display(), e);
34+
e
35+
})
36+
.with_context(|| format!("Unable to read file {}", full_path.display()))?
3437
} else {
3538
// Assume base64
3639
use base64::Engine;

0 commit comments

Comments
 (0)