From b01fcd2f564b5d8f70e47932ab754d1d07160444 Mon Sep 17 00:00:00 2001 From: hashmap Date: Wed, 31 Oct 2018 21:19:28 +0100 Subject: [PATCH] Remove unused unsafe declarations (#1901) --- p2p/src/handshake.rs | 3 --- p2p/src/peer.rs | 3 --- p2p/src/serv.rs | 3 --- store/src/leaf_set.rs | 3 --- store/src/prune_list.rs | 3 --- 5 files changed, 15 deletions(-) diff --git a/p2p/src/handshake.rs b/p2p/src/handshake.rs index 60d0b0ea4..b40bb4457 100644 --- a/p2p/src/handshake.rs +++ b/p2p/src/handshake.rs @@ -41,9 +41,6 @@ pub struct Handshake { config: P2PConfig, } -unsafe impl Sync for Handshake {} -unsafe impl Send for Handshake {} - impl Handshake { /// Creates a new handshake handler pub fn new(genesis: Hash, config: P2PConfig) -> Handshake { diff --git a/p2p/src/peer.rs b/p2p/src/peer.rs index 1e6d9ae74..784f5d8a2 100644 --- a/p2p/src/peer.rs +++ b/p2p/src/peer.rs @@ -52,9 +52,6 @@ pub struct Peer { connection: Option, } -unsafe impl Sync for Peer {} -unsafe impl Send for Peer {} - impl Peer { // Only accept and connect can be externally used to build a peer fn new(info: PeerInfo, adapter: Arc) -> Peer { diff --git a/p2p/src/serv.rs b/p2p/src/serv.rs index 4ad75fde5..4993da01b 100644 --- a/p2p/src/serv.rs +++ b/p2p/src/serv.rs @@ -41,9 +41,6 @@ pub struct Server { stop: Arc, } -unsafe impl Sync for Server {} -unsafe impl Send for Server {} - // TODO TLS impl Server { /// Creates a new idle p2p server with no peers diff --git a/store/src/leaf_set.rs b/store/src/leaf_set.rs index a0febaf96..c9221a191 100644 --- a/store/src/leaf_set.rs +++ b/store/src/leaf_set.rs @@ -36,9 +36,6 @@ pub struct LeafSet { bitmap_bak: Bitmap, } -unsafe impl Send for LeafSet {} -unsafe impl Sync for LeafSet {} - impl LeafSet { /// Open the remove log file. /// The content of the file will be read in memory for fast checking. diff --git a/store/src/prune_list.rs b/store/src/prune_list.rs index 68017a151..443a35d01 100644 --- a/store/src/prune_list.rs +++ b/store/src/prune_list.rs @@ -51,9 +51,6 @@ pub struct PruneList { leaf_shift_cache: Vec, } -unsafe impl Send for PruneList {} -unsafe impl Sync for PruneList {} - impl PruneList { /// Instantiate a new empty prune list pub fn new() -> PruneList {