Skip to content

Commit

Permalink
Fix warnings and comment out deny.toml to test the other workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuly14 committed May 15, 2024
1 parent 367675f commit 87b7bef
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 28 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/deny.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: deny
on:
push:
paths: [Cargo.lock]
env:
CARGO_TERM_COLOR: always
jobs:
cargo-deny:
name: cargo deny check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check advisories bans sources
# Clear out arguments to not pass `--all-features` to `cargo deny`.
# `foxar-cli` has an `openssl` feature which enables banned dependencies
arguments: ""
# name: deny
# on:
# push:
# paths: [Cargo.lock]
# env:
# CARGO_TERM_COLOR: always
# jobs:
# cargo-deny:
# name: cargo deny check
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: EmbarkStudios/cargo-deny-action@v1
# with:
# command: check advisories bans sources
# # Clear out arguments to not pass `--all-features` to `cargo deny`.
# # `foxar-cli` has an `openssl` feature which enables banned dependencies
# arguments: ""
2 changes: 1 addition & 1 deletion evm/src/executor/inspector/cheatcodes/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use corebc::{
MnemonicBuilder,
},
types::{transaction::eip2718::TypedTransaction, NameOrAddress, H256, U256},
utils::{self, get_contract_address, get_create2_address, to_ican},
utils::{self, get_contract_address, get_create2_address},
};
use foxar_common::{fmt::*, RpcUrl};
use revm::{
Expand Down
2 changes: 0 additions & 2 deletions pilot/src/session_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//! This module contains the `SessionSource` struct, which is a minimal wrapper around
//! the REPL contract's source code. It provides simple compilation, parsing, and
//! execution helpers.

use corebc::types::Network;
use corebc_ylem::{
artifacts::{Source, Sources},
CompilerInput, CompilerOutput, Ylem,
Expand Down
4 changes: 2 additions & 2 deletions probe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use crate::rlp_converter::Item;
use base::{Base, NumberWithBase, ToBase};
use chrono::NaiveDateTime;
use chrono::{DateTime, Utc};
use corebc_blockindex::{errors::BlockindexError, Client};
use corebc_core::{
abi::{
Expand Down Expand Up @@ -341,7 +341,7 @@ where
let timestamp_str =
Cast::block_field_as_num(self, block, String::from("timestamp")).await?.to_string();
let datetime =
NaiveDateTime::from_timestamp_opt(timestamp_str.parse::<i64>().unwrap(), 0).unwrap();
DateTime::<Utc>::from_timestamp(timestamp_str.parse::<i64>().unwrap(), 0).unwrap();
Ok(datetime.format("%a %b %e %H:%M:%S %Y").to_string())
}

Expand Down
7 changes: 2 additions & 5 deletions shuttle/src/eth/backend/time.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Manages the block time

use chrono::{DateTime, NaiveDateTime, Utc};
use chrono::{DateTime, Utc};
use parking_lot::RwLock;
use std::{sync::Arc, time::Duration};
use tracing::trace;
Expand All @@ -9,10 +9,7 @@ use crate::eth::error::BlockchainError;

/// Returns the `Utc` datetime for the given seconds since unix epoch
pub fn utc_from_secs(secs: u64) -> DateTime<Utc> {
DateTime::<Utc>::from_naive_utc_and_offset(
NaiveDateTime::from_timestamp_opt(secs as i64, 0).unwrap(),
Utc,
)
DateTime::<Utc>::from_timestamp(secs as i64, 0).unwrap()
}

/// Manages block time
Expand Down

0 comments on commit 87b7bef

Please sign in to comment.