Skip to content

Commit

Permalink
fix: clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
edytapawlak committed Mar 21, 2024
1 parent 06bdd2a commit c4d0e3b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
16 changes: 1 addition & 15 deletions oca/src/facade/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl Facade {
if schema_name.is_some() {
let schema_name = schema_name.unwrap();
let said = oca_build.oca_bundle.said.clone().unwrap().to_string();
references.save(&schema_name, said.clone());
references.save(schema_name, said.clone());
};
Ok(oca_build)
}
Expand Down Expand Up @@ -388,18 +388,4 @@ impl Facade {

Ok(oca_build.oca_bundle)
}

// TODO should not be String but SAID
#[cfg(feature = "local-references")]
fn store_reference(&mut self, refn: &String, bundle_said: String) {
if !refn.is_empty() {
self.db
.insert(
Namespace::OCAReferences,
refn,
bundle_said.to_string().as_bytes(),
)
.unwrap();
}
}
}
2 changes: 1 addition & 1 deletion oca/src/facade/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use said::SelfAddressingIdentifier;
use serde::Serialize;
#[cfg(feature = "local-references")]
use std::collections::HashMap;
use std::{borrow::Borrow, rc::Rc};
use std::str::FromStr;
use std::{borrow::Borrow, rc::Rc};

#[derive(Debug, Serialize)]
#[serde(untagged)]
Expand Down
2 changes: 1 addition & 1 deletion oca/src/facade/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl Facade {
}
}

pub fn storage<'a>(&self) -> &dyn DataStorage {
pub fn storage(&self) -> &dyn DataStorage {
self.db_cache.borrow()
}
}

0 comments on commit c4d0e3b

Please sign in to comment.