Skip to content

Commit 2d74af2

Browse files
author
Gavin Costin
committed
added annotation to ignore unused fn
1 parent acdac32 commit 2d74af2

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ simplelog = "0.12.2"
1919
auditable = "0.2.0"
2020
rustfmt = "0.10.0"
2121
clap = { version = "4.0", features = ["derive"] }
22-
tungstenite = { version = "0.24.0", features = ["native-tls"] }
22+
tungstenite = { version = "0.20.1", features = ["native-tls"] }
2323
http = "1.1.0"
2424
url = "2.2.0"
2525
io = "0.0.2"

src/messages/factory.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ use crate::utils::{get_now, side_as_int, order_type_to_char, generate_access_tok
1111
#[allow(unused)]
1212
pub struct WSMessageFactory;
1313
impl WSMessageFactory {
14-
pub fn _new_rfq_request(cl_ord_id: ClOrdID, symbol: Symbol, side: Side , order_qty: OrderQty, price: Price, order_type: OrdType ,text: &str ) -> String {
14+
#[allow(dead_code)]
15+
pub fn new_rfq_request(cl_ord_id: ClOrdID, symbol: Symbol, side: Side , order_qty: OrderQty, price: Price, order_type: OrdType ,text: &str ) -> String {
1516
info!("Cient Order Id -> {}", cl_ord_id);
1617
info!("Side -> {:?}", side);
1718
info!("Symbol -> {:?}", symbol);
@@ -164,7 +165,8 @@ impl FixMessageFactory {
164165
}
165166
msg
166167
}
167-
pub fn _new_cancel_order_single(orig_cl_ord_id: ClOrdID, cl_ord_id: &str, side: Side, symbol: String, text: String ) -> Result<OrderCancelRequest, QuickFixError> {
168+
#[allow(dead_code)]
169+
pub fn new_cancel_order_single(orig_cl_ord_id: ClOrdID, cl_ord_id: &str, side: Side, symbol: String, text: String ) -> Result<OrderCancelRequest, QuickFixError> {
168170
let result: Result<OrderCancelRequest, QuickFixError> = OrderCancelRequest::try_new(
169171
orig_cl_ord_id.to_string(),
170172
cl_ord_id.to_string(),
@@ -188,9 +190,12 @@ impl FixMessageFactory {
188190
}
189191
}
190192
}
191-
pub fn _new_order_multi(cl_ord_id: ClOrdID, side: Side, transact_time: TransactTime, order_type: OrdType) -> Result<NewOrderMultileg, QuickFixError> {
193+
#[allow(dead_code)]
194+
pub fn new_order_multi(cl_ord_id: ClOrdID, side: Side, transact_time: TransactTime, order_type: OrdType) -> Result<NewOrderMultileg, QuickFixError> {
192195
NewOrderMultileg::try_new(cl_ord_id, side, transact_time, order_type)
193196
}
197+
198+
#[allow(dead_code)]
194199
pub fn new_rfq_quote(apikey: &str, symbol: Symbol, side: Side, order_qty: OrderQty, order_type: OrdType, seqnum: u32) -> Result<Message, QuickFixError> {
195200
//
196201
// RFQ fields based on FIX 4.4 specification for new single order(MsgType='D') with
@@ -234,6 +239,7 @@ impl FixMessageFactory {
234239
/// `new_rfq_sub`
235240
/// TODO - add subscribe topic list to parameters
236241
///
242+
#[allow(dead_code)]
237243
pub fn new_rfq_sub(topics: Vec<String>) -> Result<RFQRequest, QuickFixError> {
238244
assert!(!topics.is_empty());
239245
let rfq_req_id = generate_order_id().to_string();
@@ -250,6 +256,7 @@ impl FixMessageFactory {
250256
}
251257
msg
252258
}
259+
#[allow(dead_code)]
253260
pub fn heartbeat(apikey: String, seqnum: u32, target_comp_id: &str) -> Result<Message, QuickFixError> {
254261

255262
let begin_string: String = "FIX.4.4".to_string(); // BeginString [8]

src/scenarios/rfq_listen.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use native_tls::TlsStream;
33
use quickfix::Message;
44
use std::{env::var, io::{ErrorKind, Read, Write}, net::TcpStream, thread::sleep, time::Duration};
55

6+
#[allow(dead_code)]
67
pub fn rfq_listen_fix(mut tls_stream: TlsStream<TcpStream>, rfq: Message) {
78

89
info!("Executing RFQ listen scenario");
@@ -55,4 +56,4 @@ pub fn rfq_listen_fix(mut tls_stream: TlsStream<TcpStream>, rfq: Message) {
5556
}
5657
sleep(Duration::from_secs(1));
5758
}
58-
}
59+
}

0 commit comments

Comments
 (0)