This commit is contained in:
Vomitblood 2024-03-25 23:38:37 +08:00
parent a575677898
commit 0db408e3ff
2 changed files with 7 additions and 8 deletions

View file

@ -3,7 +3,7 @@
pkgname=rustmon-git
pkgdesc="Pokemon Colorscripts written in Rust"
_gitname=rustmon
pkgver=r26.2b2a15c
pkgver=r27.a575677
pkgrel=1
arch=('x86_64')
url="https://github.com/Vomitblood/$_gitname"

View file

@ -27,17 +27,16 @@ const GENERATIONS: [(&str, (u32, u32)); 8] = [
];
fn print_file(filepath: &str) -> std::io::Result<()> {
if let Some(file) = ColorScriptsDir::get(filepath) {
ColorScriptsDir::get(filepath)
.map(|file| {
let content = std::str::from_utf8(file.data.as_ref()).unwrap();
println!("{}", content);
Ok(())
} else {
Err(std::io::Error::new(
})
.ok_or(std::io::Error::new(
std::io::ErrorKind::NotFound,
"File not found",
))
}
}
fn list_pokemon_names() -> std::io::Result<()> {
let pokemon_json: serde_json::Value = serde_json::from_str(POKEMON_JSON)?;