From 592113127d3d2421b3ec8a0c8e2ad1ae5602263e Mon Sep 17 00:00:00 2001 From: Uzair Aftab Date: Fri, 21 Jul 2023 21:05:35 +0200 Subject: [PATCH] fix: Pass slice instead of vec --- src/git_operations.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git_operations.rs b/src/git_operations.rs index 785f7b8..89d7039 100644 --- a/src/git_operations.rs +++ b/src/git_operations.rs @@ -43,8 +43,8 @@ impl GitOperations { } } - fn parse_response(response: Vec) -> Result> { - let tree: Vec = serde_json::from_slice(&response)?; + fn parse_response(response: &[u8]) -> Result> { + let tree: Vec = serde_json::from_slice(response)?; let re = Regex::new(r"/[^/]+$")?; // We don't know how many plugins there are, so we'll just allocate the max possible based on the number of files