577: Don't depend on `core::fmt` through `bitcoin_hashes` re-export r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
This commit is contained in:
bors[bot] 2021-06-21 02:42:27 +00:00 committed by GitHub
commit 7c5f70bee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -3,9 +3,9 @@ use crate::monero;
use crate::monero::{monero_private_key, TransferProof};
use crate::protocol::alice;
use crate::protocol::alice::AliceState;
use ::bitcoin::hashes::core::fmt::Display;
use monero_rpc::wallet::BlockHeight;
use serde::{Deserialize, Serialize};
use std::fmt;
// Large enum variant is fine because this is only used for database
// and is dropped once written in DB.
@ -274,8 +274,8 @@ impl From<Alice> for AliceState {
}
}
impl Display for Alice {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
impl fmt::Display for Alice {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Alice::Started { .. } => write!(f, "Started"),
Alice::BtcLocked { .. } => f.write_str("Bitcoin locked"),

View File

@ -1,9 +1,9 @@
use crate::monero::TransferProof;
use crate::protocol::bob;
use crate::protocol::bob::BobState;
use ::bitcoin::hashes::core::fmt::Display;
use monero_rpc::wallet::BlockHeight;
use serde::{Deserialize, Serialize};
use std::fmt;
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)]
pub enum Bob {
@ -104,8 +104,8 @@ impl From<Bob> for BobState {
}
}
impl Display for Bob {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
impl fmt::Display for Bob {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Bob::Started { .. } => write!(f, "Started"),
Bob::ExecutionSetupDone { .. } => f.write_str("Execution setup done"),