Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove dbg!() & finished find_capital todo #41

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/commas/add_commas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ pub fn add_commas_mut(str_mut: &mut String) {
.position(|c| c == '.')
.unwrap_or_else(|| str_mut.chars().filter(comma_less).count());

dbg!(end);
let mut i = 0;
while i < end {
if (end - i) % 3 == 0 && i != 0 {
Expand Down
10 changes: 4 additions & 6 deletions src/find_capital_by_province/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
use crate::persian_chars::to_persian_chars;

/// Returns the capital name of province you enter
pub fn find_capital_by_province<S>(inp: S) -> Option<String>
where
S: Into<String>,
{
// TODO: Accept `AsRef<str>` and remove the following `inp.into()`
let r = match to_persian_chars(inp.into()).as_str() {
pub fn find_capital_by_province(input: impl AsRef<str>) -> Option<String> {
let input = input.as_ref();

let r = match to_persian_chars(input).as_str() {
"آذربایجان شرقی" => "تبریز",
"آذربایجان غربی" => "ارومیه",
"اردبیل" => "اردبیل",
Expand Down
1 change: 0 additions & 1 deletion src/verity_card_number/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pub fn verify_card_number(digits: impl AsRef<str>) -> Result<(), VerifyCardNumbe
};
}

dbg!(&sum);
if sum % 10 == 0 {
Ok(())
} else {
Expand Down