Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
refactor(resource): make hash type implement needed traits
Browse files Browse the repository at this point in the history
Signed-off-by: Tarek <tareknaser360@gmail.com>
  • Loading branch information
tareknaser committed Mar 20, 2024
1 parent f167750 commit c205208
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
3 changes: 1 addition & 2 deletions benches/compute_bytes_benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use arklib::resource::ResourceId;
use arklib::resource::ResourceIdTrait;
use arklib::resource::{ResourceId, ResourceIdTrait};
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use rand::prelude::*;
use std::fs;
Expand Down
3 changes: 1 addition & 2 deletions src/link.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::resource::ResourceId;
use crate::resource::ResourceIdTrait;
use crate::resource::{ResourceId, ResourceIdTrait};
use crate::storage::meta::store_metadata;
use crate::storage::prop::store_properties;
use crate::{
Expand Down
13 changes: 0 additions & 13 deletions src/resource/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ pub trait ResourceIdTrait<'de>:
+ Serialize
+ Deserialize<'de>
+ Copy
where
Self::HashType: Display
+ FromStr
+ Clone
+ PartialEq
+ Eq
+ Ord
+ PartialOrd
+ Debug
+ Hash
+ Serialize
+ Deserialize<'de>
+ Copy,
{
/// Associated type representing the hash used by this resource identifier.
type HashType;
Expand Down

0 comments on commit c205208

Please sign in to comment.