Skip to content

Commit

Permalink
fix: remove prefix from Data::get
Browse files Browse the repository at this point in the history
  • Loading branch information
talwat committed Jan 14, 2024
1 parent 588d158 commit 32bf013
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 97 deletions.
82 changes: 1 addition & 81 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "pokeget"
authors = [ "talwat" ]
version = "1.4.1"
version = "1.4.2"
edition = "2021"
description = "Display pokemon sprites in your terminal."
license = "MIT"
Expand All @@ -20,5 +20,5 @@ image = { version = "0.24.6", default-features = false, features = [
"rgb",
] }
rand = "0.8.5"
rust-embed = { version = "6.8.1", features = ["include-exclude"] }
rust-embed = { version = "6.8.1" }
showie = "1.0.0"
12 changes: 1 addition & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
//! Display pokemon sprites in your terminal.

#![warn(
clippy::all,
clippy::correctness,
clippy::suspicious,
clippy::style,
clippy::complexity,
clippy::perf,
clippy::pedantic,
clippy::restriction,
clippy::nursery
)]
#![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::restriction)]

use clap::Parser;
use inflector::Inflector;
Expand Down
6 changes: 3 additions & 3 deletions src/sprites.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{utils::random, Data};
/// This will also format the names properly.
pub fn get_sprite(
pokemon: &mut String,
form: &String,
form: &str,
shiny: bool,
female: bool,
list: &[&str],
Expand Down Expand Up @@ -42,7 +42,7 @@ pub fn get_sprite(
.to_lowercase();

let path = &format!(
"pokesprite/pokemon-gen8/{}/{}{}.png",
"{}/{}{}.png",
if shiny { "shiny" } else { "regular" },
if female && !is_random { "female/" } else { "" }, // Random pokemon also shouldn't follow the female rule.
filename.trim()
Expand Down Expand Up @@ -84,7 +84,7 @@ pub fn get_sprites(
pokemons: &mut [String],
shiny: bool,
female: bool,
form: &String,
form: &str,
list: &[&str],
) -> (u32, u32, Vec<DynamicImage>) {
let mut sprites = Vec::new();
Expand Down

0 comments on commit 32bf013

Please sign in to comment.