I've tried running [this crate](https://github.com/runfalk/ed2k-rs) and it runs fine. I've copied the code, I've modified it very little when adding it to [my project](https://git.disroot.org/hirrolot19/Jedi_Archives/src/branch/main/core/src/file/cas/ed2k/), but it's giving me a bunch of errors. Have I done something wrong when adding the repository to get so many errors?
```rust
❯ cargo test
Compiling sdcore v0.1.0 (/home/user/code/rust/spacedrive/core)
error[E0437]: type `OutputSize` is not a member of trait `FixedOutput`
--> core/src/file/cas/ed2k/ed2k_hash.rs:71:5
|
71 | type OutputSize = typenum::U16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `FixedOutput`
error[E0407]: method `finalize_into_reset` is not a member of trait `FixedOutput`
--> core/src/file/cas/ed2k/ed2k_hash.rs:84:5
|
84 | fn finalize_into_reset(&mut self, out: &mut GenericArray<u8, Self::OutputSize>) {
| ^ ------------------- help: there is an associated function with a similar name: `finalize_into`
| _____|
| |
85 | | if self.num_full_chunks == 0 {
86 | | self.md4_hasher.finalize_into_reset(out);
87 | | } else {
... |
92 | | self.current_chunk_len = 0;
93 | | }
| |_____^ not a member of trait `FixedOutput`
error[E0437]: type `OutputSize` is not a member of trait `FixedOutput`
--> core/src/file/cas/ed2k/ed2k_hasher.rs:82:5
|
82 | type OutputSize = typenum::U16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `FixedOutput`
error[E0407]: method `finalize_into_reset` is not a member of trait `FixedOutput`
--> core/src/file/cas/ed2k/ed2k_hasher.rs:95:5
|
95 | fn finalize_into_reset(&mut self, out: &mut GenericArray<u8, Self::OutputSize>) {
| ^ ------------------- help: there is an associated function with a similar name: `finalize_into`
| _____|
| |
96 | | if self.num_full_chunks == 0 {
97 | | self.md4_hasher.finalize_into_reset(out);
98 | | } else {
... |
103 | | self.current_chunk_len = 0;
104 | | }
| |_____^ not a member of trait `FixedOutput`
error[E0433]: failed to resolve: use of undeclared crate or module `ed2k`
--> core/src/file/cas/ed2k/mod.rs:147:58
|
147 | let mut zero_chunk: Vec<u8> = Vec::with_capacity(ed2k::Ed2kHasher::CHUNK_SIZE);
| ^^^^ use of undeclared crate or module `ed2k`
error[E0433]: failed to resolve: use of undeclared crate or module `ed2k`
--> core/src/file/cas/ed2k/mod.rs:170:58
|
170 | let mut zero_chunk: Vec<u8> = Vec::with_capacity(ed2k::Ed2kHasher::CHUNK_SIZE);
| ^^^^ use of undeclared crate or module `ed2k`
warning: unused import: `FixedOffset`
--> core/src/file/indexer/scan.rs:3:24
|
3 | use chrono::{DateTime, FixedOffset, Utc};
| ^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `encode::ThumbnailJob`
--> core/src/sys/locations.rs:2:2
|
2 | encode::ThumbnailJob,
| ^^^^^^^^^^^^^^^^^^^^
warning: unused imports: `PrismaValue`, `raw`
--> core/src/sys/locations.rs:8:26
|
8 | use prisma_client_rust::{raw, PrismaValue};
| ^^^ ^^^^^^^^^^^
error[E0433]: failed to resolve: use of undeclared crate or module `ed2k`
--> core/src/file/cas/ed2k/mod.rs:114:32
|
114 | let mut hasher = ed2k::Ed2kHasher::new();
| ^^^^^^^^^^ not found in `ed2k`
|
help: consider importing this struct
|
101 | use crate::file::cas::ed2k::Ed2kHasher;
|
error[E0433]: failed to resolve: use of undeclared crate or module `ed2k`
--> core/src/file/cas/ed2k/mod.rs:152:36
|
152 | let mut hasher = ed2k::Ed2kHasher::new();
| ^^^^^^^^^^ not found in `ed2k`
|
help: consider importing this struct
|
101 | use crate::file::cas::ed2k::Ed2kHasher;
|
error[E0433]: failed to resolve: use of undeclared crate or module `ed2k`
--> core/src/file/cas/ed2k/mod.rs:160:36
|
160 | let mut hasher = ed2k::Ed2kHasher::new();
| ^^^^^^^^^^ not found in `ed2k`
|
help: consider importing this struct
|
101 | use crate::file::cas::ed2k::Ed2kHasher;
|
error[E0433]: failed to resolve: use of undeclared crate or module `ed2k`
--> core/src/file/cas/ed2k/mod.rs:175:36
|
175 | let mut hasher = ed2k::Ed2kHasher::with_legacy_hashing(true);
| ^^^^^^^^^^ not found in `ed2k`
|
help: consider importing this struct
|
101 | use crate::file::cas::ed2k::Ed2kHasher;
|
error[E0433]: failed to resolve: use of undeclared crate or module `ed2k`
--> core/src/file/cas/ed2k/mod.rs:183:36
|
183 | let mut hasher = ed2k::Ed2kHasher::with_legacy_hashing(true);
| ^^^^^^^^^^ not found in `ed2k`
|
help: consider importing this struct
|
101 | use crate::file::cas::ed2k::Ed2kHasher;
|
error[E0277]: the trait bound `Ed2kHash: OutputSizeUser` is not satisfied
--> core/src/file/cas/ed2k/ed2k_hash.rs:70:6
|
70 | impl FixedOutput for Ed2kHash {
| ^^^^^^^^^^^ the trait `OutputSizeUser` is not implemented for `Ed2kHash`
|
note: required by a bound in `FixedOutput`
--> /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/digest-0.10.3/src/lib.rs:91:33
|
91 | pub trait FixedOutput: Update + OutputSizeUser + Sized {
| ^^^^^^^^^^^^^^ required by this bound in `FixedOutput`
error[E0277]: the trait bound `Ed2kHash: OutputSizeUser` is not satisfied
--> core/src/file/cas/ed2k/ed2k_hash.rs:73:59
|
73 | fn finalize_into(mut self, out: &mut GenericArray<u8, Self::OutputSize>) {
| ^^^^^^^^^^^^^^^^ the trait `OutputSizeUser` is not implemented for `Ed2kHash`
error[E0277]: the trait bound `Ed2kHash: OutputSizeUser` is not satisfied
--> core/src/file/cas/ed2k/ed2k_hash.rs:84:66
|
84 | fn finalize_into_reset(&mut self, out: &mut GenericArray<u8, Self::OutputSize>) {
| ^^^^^^^^^^^^^^^^ the trait `OutputSizeUser` is not implemented for `Ed2kHash`
error[E0277]: the trait bound `Ed2kHasher: OutputSizeUser` is not satisfied
--> core/src/file/cas/ed2k/ed2k_hasher.rs:81:6
|
81 | impl FixedOutput for Ed2kHasher {
| ^^^^^^^^^^^ the trait `OutputSizeUser` is not implemented for `Ed2kHasher`
|
note: required by a bound in `FixedOutput`
--> /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/digest-0.10.3/src/lib.rs:91:33
|
91 | pub trait FixedOutput: Update + OutputSizeUser + Sized {
| ^^^^^^^^^^^^^^ required by this bound in `FixedOutput`
error[E0277]: the trait bound `Ed2kHasher: OutputSizeUser` is not satisfied
--> core/src/file/cas/ed2k/ed2k_hasher.rs:84:59
|
84 | fn finalize_into(mut self, out: &mut GenericArray<u8, Self::OutputSize>) {
| ^^^^^^^^^^^^^^^^ the trait `OutputSizeUser` is not implemented for `Ed2kHasher`
error[E0277]: the trait bound `Ed2kHasher: OutputSizeUser` is not satisfied
--> core/src/file/cas/ed2k/ed2k_hasher.rs:95:66
|
95 | fn finalize_into_reset(&mut self, out: &mut GenericArray<u8, Self::OutputSize>) {
| ^^^^^^^^^^^^^^^^ the trait `OutputSizeUser` is not implemented for `Ed2kHasher`
Some errors have detailed explanations: E0277, E0407, E0437.
For more information about an error, try `rustc --explain E0277`.
warning: `sdcore` (lib) generated 3 warnings
error: could not compile `sdcore` due to 10 previous errors; 3 warnings emitted
warning: build failed, waiting for other jobs to finish...
Some errors have detailed explanations: E0277, E0407, E0433, E0437.
warning: `sdcore` (lib test) generated 3 warnings (3 duplicates)
error: build failed
```