Skip to content

Commit

Permalink
Reformat after rebase over latest
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
  • Loading branch information
rydrman committed Mar 1, 2022
1 parent ae475b0 commit b464e4b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub async fn tmprepo(kind: &str) -> TempRepo {
let repo = Arc::new(spfs::storage::RepositoryHandle::FS(
spfs::storage::fs::FSRepository::create(tmpdir.path().join("repo"))
.await
.unwrap()
.unwrap(),
));
let listen: std::net::SocketAddr = "127.0.0.1:0".parse().unwrap();
let http_listener = std::net::TcpListener::bind(listen).unwrap();
Expand Down
12 changes: 7 additions & 5 deletions src/server/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ impl proto::database_service_server::DatabaseService for DatabaseService {
) -> Result<Response<proto::ReadObjectResponse>, Status> {
let request = request.into_inner();
let digest = proto::handle_error!(request.digest.try_into());
let object = {
proto::handle_error!(self.repo.read_object(digest).await)
};
let object = { proto::handle_error!(self.repo.read_object(digest).await) };
let result = proto::ReadObjectResponse::ok((&object).into());
Ok(Response::new(result))
}
Expand All @@ -56,14 +54,18 @@ impl proto::database_service_server::DatabaseService for DatabaseService {
&self,
_request: Request<proto::IterObjectsRequest>,
) -> Result<Response<Self::IterObjectsStream>, Status> {
Err(Status::unimplemented("object iteration is no yet supported directly over gRPC"))
Err(Status::unimplemented(
"object iteration is no yet supported directly over gRPC",
))
}

async fn walk_objects(
&self,
_request: Request<proto::WalkObjectsRequest>,
) -> Result<Response<Self::WalkObjectsStream>, Status> {
Err(Status::unimplemented("object walking is no yet supported directly over gRPC"))
Err(Status::unimplemented(
"object walking is no yet supported directly over gRPC",
))
}

async fn write_object(
Expand Down
4 changes: 1 addition & 3 deletions src/server/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ impl proto::tag_service_server::TagService for TagService {
tracing::trace!("recieve request");
let request = request.into_inner();
let path = relative_path::RelativePath::new(&request.path);
let entries: crate::Result<Vec<_>> = {
self.repo.ls_tags(path).collect().await
};
let entries: crate::Result<Vec<_>> = { self.repo.ls_tags(path).collect().await };
let entries = proto::handle_error!(entries);

let data = proto::LsTagsResponse::ok(proto::ls_tags_response::EntryList { entries });
Expand Down
3 changes: 2 additions & 1 deletion src/storage/database_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ async fn test_object_existance(#[future] tmprepo: TempRepo) {
let digest = encoding::EMPTY_DIGEST.into();
let obj = graph::Blob::new(digest, 0).into();
tmprepo
.write_object(&obj).await
.write_object(&obj)
.await
.expect("failed to write object data");

let actual = tmprepo.has_object(digest).await;
Expand Down

0 comments on commit b464e4b

Please sign in to comment.