export_links on game returns a hashSet

This commit is contained in:
2026-03-17 14:26:10 +01:00
parent 0e72675965
commit e0fd8aa8ea

View File

@@ -1,4 +1,5 @@
use std::{ use std::{
collections::HashSet,
io, io,
path::{Path, PathBuf}, path::{Path, PathBuf},
}; };
@@ -20,8 +21,8 @@ impl Game {
} }
} }
pub fn export_links(&self) -> Result<Vec<Link>, io::Error> { pub fn export_links(&self) -> Result<HashSet<Link>, io::Error> {
let links: Vec<Link> = walk_all_files(&self.path)? let links: HashSet<Link> = walk_all_files(&self.path)?
.map(|entry| { .map(|entry| {
Link::new( Link::new(
entry.path(), entry.path(),