Commit c81798ff authored by Éloïs's avatar Éloïs

[style] fix clippy warnings

parent 375ffa42
......@@ -78,23 +78,11 @@ pub fn parse_doc_and_verify(source: &str, doc_type: DocumentType) -> DocCheckRes
},
Document_::NetworkDocument(network_document) => match network_document {
NetworkDocument::Peer(peer_box) => match peer_box.deref() {
PeerCard::V11(peer_v11) => {
if let Ok(_) = peer_v11.verify() {
true
} else {
false
}
}
PeerCard::V11(peer_v11) => peer_v11.verify().is_ok(),
_ => unimplemented!(),
},
NetworkDocument::Head(head) => match head {
NetworkHead::V3(head_v3_box) => {
if let Ok(_) = head_v3_box.deref().verify() {
true
} else {
false
}
}
NetworkHead::V3(head_v3_box) => head_v3_box.deref().verify().is_ok(),
_ => unimplemented!(),
},
},
......@@ -150,7 +138,7 @@ pub fn parse_doc_into_json(doc: &str, doc_type: DocumentType) -> String {
"Invalid document. Specify the expected document type for more information."
.to_owned()
}
TextDocumentParseError::PestError(pest_error) => format!("{}", pest_error),
TextDocumentParseError::PestError(pest_error) => pest_error,
_ => format!("{:?}", parse_error),
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment