Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
fix: Pass slice instead of vec
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzaaft committed Jul 21, 2023
1 parent 4db04f4 commit 5921131
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/git_operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ impl GitOperations {
}
}

fn parse_response(response: Vec<u8>) -> Result<Vec<PluginInfo>> {
let tree: Vec<RepoContent> = serde_json::from_slice(&response)?;
fn parse_response(response: &[u8]) -> Result<Vec<PluginInfo>> {
let tree: Vec<RepoContent> = 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
Expand Down

0 comments on commit 5921131

Please sign in to comment.