diff --git a/Cargo.lock b/Cargo.lock index 98e03b2cb1..8b3317d6f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1941,7 +1941,6 @@ dependencies = [ "mime_guess", "nix", "pretty_assertions", - "primes", "pulldown-cmark", "rayon", "redb", @@ -2111,12 +2110,6 @@ dependencies = [ "yansi", ] -[[package]] -name = "primes" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a61082d8bceecd71a3870e9162002bb75f7ba9c7aa8b76227e887782fef9c8" - [[package]] name = "proc-macro-crate" version = "0.1.5" diff --git a/Cargo.toml b/Cargo.toml index 1dd365182e..c19e127a4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,6 @@ http = "0.2.6" lazy_static = "1.4.0" log = "0.4.14" mime_guess = "2.0.4" -primes = "0.3.0" rayon = "1.5.1" redb = "0.7.0" regex = "1.6.0" diff --git a/src/ordinal.rs b/src/ordinal.rs index b57fcaad25..5af2405bdc 100644 --- a/src/ordinal.rs +++ b/src/ordinal.rs @@ -52,10 +52,6 @@ impl Ordinal { self.into() } - pub(crate) fn prime(self) -> bool { - primes::is_prime(self.0) - } - pub(crate) fn name(self) -> String { let mut x = Self::SUPPLY - self.0; let mut name = String::new(); diff --git a/src/subcommand/server/templates/ordinal.rs b/src/subcommand/server/templates/ordinal.rs index 174717da13..6c6c7fe895 100644 --- a/src/subcommand/server/templates/ordinal.rs +++ b/src/subcommand/server/templates/ordinal.rs @@ -37,7 +37,6 @@ mod tests {
block
0
offset
0
rarity
mythic
-
prime
false
time
1970-01-01 00:00:00
prev @@ -47,18 +46,6 @@ mod tests { ); } - #[test] - fn two_is_prime() { - assert_regex_match!( - OrdinalHtml { - ordinal: Ordinal(2), - blocktime: Blocktime::Confirmed(0), - } - .to_string(), - ".*
prime
true
.*", - ); - } - #[test] fn ordinal_next_and_previous() { assert_eq!( @@ -80,7 +67,6 @@ mod tests {
block
0
offset
1
rarity
common
-
prime
false
time
1970-01-01 00:00:00
prev diff --git a/templates/ordinal.html b/templates/ordinal.html index f59b73a56c..e87144f597 100644 --- a/templates/ordinal.html +++ b/templates/ordinal.html @@ -10,7 +10,6 @@

Ordinal {{ self.ordinal.n() }}

block
{{ self.ordinal.height() }}
offset
{{ self.ordinal.third() }}
rarity
{{ self.ordinal.rarity() }}
-
prime
{{ self.ordinal.prime() }}
time
{{ self.blocktime }}
%% if self.ordinal.n() > 0 {