export_links on game returns a hashSet
This commit is contained in:
@@ -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(),
|
||||||
|
|||||||
Reference in New Issue
Block a user