Skip to content

Commit d4d9f51

Browse files
committed
fmt + clippy
1 parent 71de5f8 commit d4d9f51

File tree

4 files changed

+11
-21
lines changed

4 files changed

+11
-21
lines changed

src/common/types.rs

+8-12
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ use clvmr::allocator::{Allocator, NodePtr, SExp};
1616
use clvmr::reduction::EvalErr;
1717
use clvmr::serde::{node_from_bytes, node_to_bytes};
1818

19-
#[cfg(test)]
20-
use clvm_tools_rs::classic::clvm::__type_compatibility__::Stream;
21-
#[cfg(test)]
22-
use clvm_tools_rs::classic::clvm::serialize::sexp_to_stream;
2319
use clvm_tools_rs::classic::clvm::sexp::proper_list;
2420
use clvm_tools_rs::classic::clvm::syntax_error::SyntaxErr;
2521
use clvm_tools_rs::classic::clvm_tools::sha256tree::sha256tree;
@@ -546,14 +542,14 @@ impl Default for Node {
546542
}
547543
}
548544

549-
impl Node {
550-
#[cfg(test)]
551-
pub fn to_hex(&self, allocator: &mut AllocEncoder) -> String {
552-
let mut stream = Stream::new(None);
553-
sexp_to_stream(allocator.allocator(), self.0, &mut stream);
554-
stream.get_value().hex()
555-
}
556-
}
545+
// impl Node {
546+
// #[cfg(test)]
547+
// pub fn to_hex(&self, allocator: &mut AllocEncoder) -> String {
548+
// let mut stream = Stream::new(None);
549+
// sexp_to_stream(allocator.allocator(), self.0, &mut stream);
550+
// stream.get_value().hex()
551+
// }
552+
// }
557553

558554
impl ToClvm<NodePtr> for Node {
559555
fn to_clvm(

src/tests/game.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
#[cfg(feature = "sim-tests")]
22
use crate::channel_handler::game::Game;
33
#[cfg(feature = "sim-tests")]
4-
use crate::channel_handler::types::ChannelHandlerEnv;
5-
use crate::common::standard_coin::{
6-
private_to_public_key, puzzle_hash_for_synthetic_public_key, ChiaIdentity,
7-
};
8-
use crate::common::types::{Amount, CoinString, Error, IntoErr, Timeout};
9-
use rand::prelude::*;
10-
11-
use crate::channel_handler::runner::ChannelHandlerGame;
4+
use crate::channel_handler::types::{ChannelHandlerEnv, ChannelHandlerGame};
125

136
#[cfg(feature = "sim-tests")]
147
use crate::tests::simulator::Simulator;

src/tests/game_handler.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fn test_game_handler_their_move_slash() {
4949
.expect("should run");
5050
if let TheirTurnResult::Slash(evidence, aggsig) = result {
5151
// Good, check more
52-
assert_eq!(aggsig, default_aggsig);
52+
assert_eq!(*aggsig, default_aggsig);
5353
assert_eq!(disassemble(allocator.allocator(), evidence.to_nodeptr(), None), "(1337 () () () 0x0000000000000000000000000000000000000000000000000000000000000000 () ())");
5454
} else {
5555
assert!(false);

src/tests/referee.rs

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use crate::referee::{GameMoveDetails, GameMoveStateInfo, RefereeMaker, Validator
1818

1919
pub struct DebugGamePrograms {
2020
pub my_validation_program: NodePtr,
21+
#[allow(dead_code)]
2122
pub their_validation_program: NodePtr,
2223
pub my_turn_handler: GameHandler,
2324
pub their_turn_handler: GameHandler,

0 commit comments

Comments
 (0)