Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sandreae committed Aug 9, 2023
1 parent 196c1fc commit 1633382
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aquadoggo/src/materializer/tasks/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ pub async fn blob_task(context: Context, input: TaskInput) -> TaskResult<TaskInp
let blob_dir = base_path
.join(BLOBS_DIR_NAME)
.join(blob_document.id().as_str());

fs::create_dir_all(&blob_dir).map_err(|err| TaskError::Critical(err.to_string()))?;
let blob_view_path = blob_dir.join(blob_document.view_id().to_string());

Check warning on line 91 in aquadoggo/src/materializer/tasks/blob.rs

View check run for this annotation

Codecov / codecov/patch

aquadoggo/src/materializer/tasks/blob.rs#L86-L91

Added lines #L86 - L91 were not covered by tests

// Write the blob to the filesystem.
info!("Creating blob at path {blob_view_path:?}");

Check warning on line 94 in aquadoggo/src/materializer/tasks/blob.rs

View check run for this annotation

Codecov / codecov/patch

aquadoggo/src/materializer/tasks/blob.rs#L94

Added line #L94 was not covered by tests

let mut file = File::create(&blob_view_path).unwrap();
file.write_all(blob_data.as_bytes()).unwrap();

Expand All @@ -104,9 +104,9 @@ pub async fn blob_task(context: Context, input: TaskInput) -> TaskResult<TaskInp
.join(BLOBS_DIR_NAME)
.join(BLOBS_SYMLINK_DIR_NAME)
.join(blob_document.id().as_str());

let _ = fs::remove_file(&link_path);

symlink(blob_view_path, link_path)
.map_err(|err| TaskError::Critical(err.to_string()))?;
}

Check warning on line 112 in aquadoggo/src/materializer/tasks/blob.rs

View check run for this annotation

Codecov / codecov/patch

aquadoggo/src/materializer/tasks/blob.rs#L103-L112

Added lines #L103 - L112 were not covered by tests
Expand Down

0 comments on commit 1633382

Please sign in to comment.