Skip to content

Commit

Permalink
Remove unnecessary borrow (MystenLabs#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwtian authored Sep 22, 2022
1 parent 3f643df commit 057e0b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions narwhal/dag/src/node_dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub trait Affiliated: fastcrypto::Hash {
///
/// /!\ Warning /!\: do not drop the heads of the graph without having given them new antecedents,
/// as this will transitively drop all the nodes they point to and may cause loss of data.
///
///
#[derive(Debug)]
pub struct NodeDag<T: Affiliated> {
// Not that we should need to ever serialize this (we'd rather rebuild the Dag from a persistent store)
Expand Down Expand Up @@ -269,13 +269,13 @@ mod tests {

impl fmt::Debug for TestDigest {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
write!(f, "{}", hex::encode(&self.0).get(0..16).unwrap())
write!(f, "{}", hex::encode(self.0).get(0..16).unwrap())
}
}

impl fmt::Display for TestDigest {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
write!(f, "{}", hex::encode(&self.0).get(0..16).unwrap())
write!(f, "{}", hex::encode(self.0).get(0..16).unwrap())
}
}

Expand Down

0 comments on commit 057e0b0

Please sign in to comment.