Skip to content

해시 맵 사용해서 링크 중복 제거#50

Merged
reddevilmidzy merged 1 commit intomainfrom
dup
May 14, 2025
Merged

해시 맵 사용해서 링크 중복 제거#50
reddevilmidzy merged 1 commit intomainfrom
dup

Conversation

@reddevilmidzy
Copy link
Owner

♟️ What’s this PR about?

HashMap을 사용해서 Repository에서 추출한 링크의 중복으 제거하였다.
테스트를 추가하지는 못했는데, 이유는 현재 git 모듈에 있는 함수가 repository 링크 받아서 클론 하고 파일에서 링크 추출하는 역할을 전부 수행하고 있어서, 즉 한 함수가 하고 있는 일이 많아서 테스트하기가 어렵다.

추후에 이 함수의 역할을 분리하여 테스트를 진행할 수 있도록 해야겠다.

🔗 Related Issues / PRs

part of #49

Copilot AI review requested due to automatic review settings May 14, 2025 07:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the repository link extraction function to remove duplicate links using a HashSet.

  • The LinkInfo struct is updated with Eq, PartialEq, and Hash derives.
  • The extract_links_from_repo_url function now returns a HashSet instead of a Vec and uses HashSet::insert to add elements.
Comments suppressed due to low confidence (1)

src/git/mod.rs:19

  • Changing the return type from Vec to HashSet removes element ordering; please ensure that consumers of this function do not rely on a specific order or update the documentation accordingly.
pub fn extract_links_from_repo_url(repo_url: &str) -> Result<HashSet<LinkInfo>, git2::Error> {

@reddevilmidzy reddevilmidzy merged commit 94738f1 into main May 14, 2025
2 checks passed
@reddevilmidzy reddevilmidzy deleted the dup branch May 14, 2025 07:56
@reddevilmidzy reddevilmidzy mentioned this pull request May 15, 2025
4 tasks
@reddevilmidzy reddevilmidzy added this to the 2차 MVP 구현 milestone Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants