Skip to content

Commit 507dc15

Browse files
committed
Remove now-unused dependencies
1 parent ecda10e commit 507dc15

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

src/rust/phone_encoder/Cargo.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,3 @@ version = "0.1.0"
44
edition = "2018"
55
authors = ["Renato Athaydes <[email protected]>"]
66
license = ""
7-
8-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
9-
10-
[dependencies]
11-
num-bigint = "0.4"
12-
lazy_static = "1.4.0"

src/rust/phone_encoder/src/main.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,8 @@ use std::io::{self, BufRead};
55
use std::path::Path;
66
use std::fmt::{self, Display, Formatter};
77

8-
use lazy_static::lazy_static;
9-
use num_bigint::{BigUint, ToBigUint};
10-
118
type Dictionary = HashMap<Vec<u8>, Vec<String>>;
129

13-
lazy_static! {
14-
static ref ONE: BigUint = 1.to_biguint().unwrap();
15-
static ref TEN: BigUint =10.to_biguint().unwrap();
16-
}
17-
1810
#[derive(Debug, Copy, Clone)]
1911
enum WordOrDigit<'a> {
2012
Word(&'a str),
@@ -135,11 +127,6 @@ fn word_to_number(word: &str) -> Vec<u8> {
135127
.collect()
136128
}
137129

138-
fn nth_digit(digits: &[u8], i: usize) -> BigUint {
139-
let ch = digits.get(i).expect("index out of bounds");
140-
((*ch as usize) - ('0' as usize)).to_biguint().unwrap()
141-
}
142-
143130
fn char_to_digit(ch: char) -> u8 {
144131
match ch.to_ascii_lowercase() {
145132
'e' => 0,

0 commit comments

Comments
 (0)