Skip to content

Commit

Permalink
failed to parse path message
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson committed Mar 25, 2024
1 parent 13527ed commit 5afee03
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clients/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "arma3-wiki"
description = "A project to store data about Arma 3 commands in a useable format"
license = "MIT"
version = "0.1.4"
version = "0.1.5"
edition = "2021"

[lints]
Expand Down
6 changes: 4 additions & 2 deletions clients/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ impl Wiki {
for entry in std::fs::read_dir(appdata.join("commands")).unwrap() {
let path = entry.unwrap().path();
if path.is_file() {
let command: Command =
serde_yaml::from_reader(std::fs::File::open(path).unwrap()).unwrap();
let command: Command = serde_yaml::from_reader(std::fs::File::open(&path).unwrap())
.unwrap_or_else(|_| {
panic!("Failed to parse command: {path}", path = path.display())
});
commands.insert(command.name().to_string(), command);
}
}
Expand Down

0 comments on commit 5afee03

Please sign in to comment.