Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
bragov4ik committed Dec 27, 2024
1 parent 3e7d4ca commit 277ea50
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stats/stats-server/src/read_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ fn get_counter_query_handle(name: &str, counter: &EnabledChartEntry) -> Option<C
impl ReadService {
pub fn main_page_charts() -> Vec<String> {
// ensure that changes to api are reflected here
#[allow(clippy::no_effect)]
proto_v1::MainPageStats {
average_block_time: None,
total_addresses: None,
Expand All @@ -159,6 +160,7 @@ impl ReadService {

pub fn contracts_page_charts() -> Vec<String> {
// ensure that changes to api are reflected here
#[allow(clippy::no_effect)]
proto_v1::ContractsPageStats {
total_contracts: None,
new_contracts_24h: None,
Expand All @@ -175,6 +177,7 @@ impl ReadService {

pub fn transactions_page_charts() -> Vec<String> {
// ensure that changes to api are reflected here
#[allow(clippy::no_effect)]
proto_v1::TransactionsPageStats {
pending_txns: None,
txns_fee_24h: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub async fn test_contracts_page_ok(base: Url) {
("new_verified_contracts_24h", new_verified_contracts_24h),
];
for (name, counter) in counters {
#[allow(clippy::expect_fun_call)]
let counter = counter.expect(&format!("page counter {} must be available", name));
assert!(!counter.description.is_empty());
assert!(!counter.title.is_empty());
Expand Down
1 change: 1 addition & 0 deletions stats/stats-server/tests/it/chart_endpoints/main_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pub async fn test_main_page_ok(base: Url) {
("yesterday_txns", yesterday_txns),
];
for (name, counter) in counters {
#[allow(clippy::expect_fun_call)]
let counter = counter.expect(&format!("page counter {} must be available", name));
assert!(!counter.description.is_empty());
assert!(!counter.title.is_empty());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub async fn test_transactions_page_ok(base: Url) {
("total_txns", total_txns),
];
for (name, counter) in counters {
#[allow(clippy::expect_fun_call)]
let counter = counter.expect(&format!("page counter {} must be available", name));
assert!(!counter.description.is_empty());
assert!(!counter.title.is_empty());
Expand Down

0 comments on commit 277ea50

Please sign in to comment.