about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-10-30 13:01:39 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-10-30 13:08:28 +0100
commit3681dc443116a8f3b48595fea3d584187bef3599 (patch)
tree32be1c887422138d12cfd2b20f3432303c5d8aef
parentMisc: Add local lib crate to share common structs (diff)
downloadOSSE-3681dc443116a8f3b48595fea3d584187bef3599.tar.gz
OSSE-3681dc443116a8f3b48595fea3d584187bef3599.tar.bz2
OSSE-3681dc443116a8f3b48595fea3d584187bef3599.zip
Misc: Remove unneeded dependencies
-rw-r--r--Cargo.lock5
-rw-r--r--crawler/Cargo.toml1
-rw-r--r--frontend/Cargo.toml2
-rw-r--r--indexer/Cargo.toml2
-rw-r--r--lib/Cargo.toml2
-rw-r--r--lib/src/lib.rs3
6 files changed, 3 insertions, 12 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 81bd414..0d2c505 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -448,7 +448,6 @@ dependencies = [
  "rand 0.7.3",
  "reqwest",
  "scraper",
- "serde",
  "tokio 0.2.25",
  "url",
 ]
@@ -621,8 +620,6 @@ dependencies = [
  "gloo-net",
  "itertools",
  "lib",
- "scraper",
- "serde",
  "wasm-bindgen",
  "wasm-bindgen-futures",
  "web-sys",
@@ -1123,9 +1120,7 @@ dependencies = [
  "actix-web",
  "html2text",
  "lib",
- "rand 0.7.3",
  "scraper",
- "serde",
  "serde_json",
 ]
 
diff --git a/crawler/Cargo.toml b/crawler/Cargo.toml
index 6badd7a..1f515d8 100644
--- a/crawler/Cargo.toml
+++ b/crawler/Cargo.toml
@@ -9,7 +9,6 @@ edition = "2021"
 reqwest = {version = "0.10.9", features = ["blocking", "json"]}
 scraper = "0.12.0"
 itertools = "0.10.5"
-serde = { version = "1.0", features = ["derive"] }
 tokio = { version = "0.2.22", features = ["full"] }
 async-channel = "1.7.1"
 url = "2.3.1"
diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml
index b528d2b..e348451 100644
--- a/frontend/Cargo.toml
+++ b/frontend/Cargo.toml
@@ -11,8 +11,6 @@ gloo = "0.8.0"
 web-sys = "0.3.60"
 wasm-bindgen = "0.2.83"
 gloo-net = "0.2"
-serde = { version = "1.0", features = ["derive", "rc"] }
 wasm-bindgen-futures = "0.4"
 itertools = "0.10.5"
-scraper = "0.12.0"
 lib = { path = "../lib" }
\ No newline at end of file
diff --git a/indexer/Cargo.toml b/indexer/Cargo.toml
index 3627da8..28e6f17 100644
--- a/indexer/Cargo.toml
+++ b/indexer/Cargo.toml
@@ -8,10 +8,8 @@ edition = "2021"
 [dependencies]
 actix-web = "4.2.1"
 actix-cors = "0.6.3"
-serde = { version = "1.0", features = ["derive"] }
 scraper = "0.12.0"
 html2text = "0.4.3"
-rand = "0.7.3"
 serde_json = "1.0.87"
 lib = { path = "../lib" }
 
diff --git a/lib/Cargo.toml b/lib/Cargo.toml
index a43e09e..35a385c 100644
--- a/lib/Cargo.toml
+++ b/lib/Cargo.toml
@@ -6,4 +6,4 @@ edition = "2021"
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-serde = { version = "1.0", features = ["derive"] }
+serde = { version = "1.0", features = ["derive", "rc"] }
diff --git a/lib/src/lib.rs b/lib/src/lib.rs
index a11637f..2f0b750 100644
--- a/lib/src/lib.rs
+++ b/lib/src/lib.rs
@@ -1,4 +1,5 @@
 pub mod lib {
+
     use serde::{Serialize,Deserialize};
     use std::sync::Arc;
     use std::hash::{Hash, Hasher};
@@ -33,6 +34,7 @@ pub mod lib {
         }
     }
 
+    //Reverse ordering as priority: 1 is less than priority: 2
     impl Ord for IndexedResource {
         fn cmp(&self, other: &Self) -> Ordering {
             self.priority.cmp(&other.priority).reverse()
@@ -46,5 +48,4 @@ pub mod lib {
         }
     }
 
-
 }
\ No newline at end of file