Skip to content

Commit

Permalink
remove pub from some functions
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Schoolderman <[email protected]>
  • Loading branch information
tweedegolf-marc committed Jun 18, 2024
1 parent 761231f commit c5ffaf9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
7 changes: 5 additions & 2 deletions examples/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ async fn run() -> Result<(), Error> {
.send(sender_vid, receiver_vid, non_confidential_data, &message)
.await
{
Ok(()) => {},
Ok(()) => {}
Err(e) => {
tracing::error!(
"error sending message from {sender_vid} to {receiver_vid}: {e}"
Expand All @@ -345,7 +345,10 @@ async fn run() -> Result<(), Error> {
};

if args.pretty_print {
let cesr_message = vid_database.as_store().seal_message(sender_vid, receiver_vid, non_confidential_data, &message)?.1;
let cesr_message = vid_database
.as_store()
.seal_message(sender_vid, receiver_vid, non_confidential_data, &message)?
.1;
print_message(&cesr_message);
}

Expand Down
2 changes: 1 addition & 1 deletion tsp/src/async_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl AsyncStore {

/// Expose the inner non-async database
pub fn as_store(&self) -> &Store {
&self.inner
&self.inner
}

/// Import the database from serializable default types
Expand Down
9 changes: 2 additions & 7 deletions tsp/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,7 @@ impl Store {
}

/// Resolve a route, extract the next hop and verify the route
pub fn resolve_route<'a>(
&'a self,
hop_list: &'a [&str],
) -> Result<(String, Vec<&'a [u8]>), Error> {
fn resolve_route<'a>(&'a self, hop_list: &'a [&str]) -> Result<(String, Vec<&'a [u8]>), Error> {
let Some(next_hop) = hop_list.first() else {
return Err(Error::InvalidRoute(
"relationship route must not be empty".into(),
Expand Down Expand Up @@ -875,9 +872,7 @@ impl Store {
Ok(())
}

//TODO: this should not be `pub` after the refactor that moves logic from async_store
//back into the "sync" store
pub fn add_nested_thread_id(&self, vid: &str, thread_id: Digest) -> Result<(), Error> {
fn add_nested_thread_id(&self, vid: &str, thread_id: Digest) -> Result<(), Error> {
let mut vids = self.vids.write()?;
let Some(context) = vids.get_mut(vid) else {
return Err(Error::MissingVid(vid.into()));
Expand Down

0 comments on commit c5ffaf9

Please sign in to comment.