aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/filecache.rs2
-rw-r--r--src/index.rs2
-rw-r--r--src/vector.rs4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/filecache.rs b/src/filecache.rs
index c584c0b..5e9d324 100644
--- a/src/filecache.rs
+++ b/src/filecache.rs
@@ -8,7 +8,7 @@ pub struct FileCache {
impl FileCache {
pub fn from_line(line : String) -> Self {
let ls : Vec<String> = line.split(',').map(|s| s.to_string()).collect();
- let v = FileVector::from_hex(ls[1].clone());
+ let v = FileVector::from_string(ls[1].clone());
let p = ls[0].clone().replace("\0", ",");
Self {
vector : v,
diff --git a/src/index.rs b/src/index.rs
index 7ca31f1..4fabe32 100644
--- a/src/index.rs
+++ b/src/index.rs
@@ -53,7 +53,7 @@ impl Index {
.to_str()
.unwrap()
.replace(",", "\0"),
- fv.to_hex()
+ fv.to_string()
).ok();
filecache.push(FileCache {
diff --git a/src/vector.rs b/src/vector.rs
index ce1139d..366812f 100644
--- a/src/vector.rs
+++ b/src/vector.rs
@@ -23,7 +23,7 @@ impl FileVector {
Self { data : HashMap::new() }
}
- pub fn from_hex(hex : String) -> Self {
+ pub fn from_string(hex : String) -> Self {
let mut data : HashMap<u64, u64> = HashMap::new();
let data_chunks : Vec<&str> = hex.split(' ').collect();
@@ -39,7 +39,7 @@ impl FileVector {
Self { data }
}
- pub fn to_hex(&self) -> String {
+ pub fn to_string(&self) -> String {
let mut hex = String::new();
for (i, v) in self.data.iter() {