refactor(build): reformat code and add tonic health dependency
- Reformatted build script with proper indentation and line breaks - Added tonic-health dependency to Cargo.toml and updated lock file - Improved error handling in disk cache with concurrent deletion checks - Refactored conditional chains using && and let expressions - Reformatted struct initialization and function parameter lists - Added proper spacing and alignment in language stats processing - Improved assertion formatting in test cases - Reorganized import statements and code layout in multiple files - Updated metrics functions with better parameter handling and formatting
This commit is contained in:
+7
-8
@@ -58,14 +58,13 @@ impl GitBare {
|
||||
|
||||
for line in stdout.lines().skip(request.offset as usize) {
|
||||
let hex = line.trim();
|
||||
if let Ok(oid) = gix::ObjectId::from_hex(hex.as_bytes()) {
|
||||
if let Ok(obj) = repo.find_object(oid) {
|
||||
if let Ok(commit) = obj.try_into_commit() {
|
||||
commits.push(crate::commit::get_commit::commit_to_pb(
|
||||
self, &commit, false,
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Ok(oid) = gix::ObjectId::from_hex(hex.as_bytes())
|
||||
&& let Ok(obj) = repo.find_object(oid)
|
||||
&& let Ok(commit) = obj.try_into_commit()
|
||||
{
|
||||
commits.push(crate::commit::get_commit::commit_to_pb(
|
||||
self, &commit, false,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user