Skip to content

Commit

Permalink
update to rust 1.59 (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
Voxelot authored Feb 25, 2022
1 parent e476a89 commit 034f90f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build
FROM rust:1.58.1 as builder
FROM rust:1.59.0 as builder

ENV CARGO_NET_GIT_FETCH_WITH_CLI=true

Expand Down
9 changes: 3 additions & 6 deletions fuel-client/tests/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ fn basic_script_snapshot() {
];
let script: Vec<u8> = script
.iter()
.map(|op| u32::from(*op).to_be_bytes())
.flatten()
.flat_map(|op| u32::from(*op).to_be_bytes())
.collect();
insta::assert_snapshot!(format!("{:?}", script));
}
Expand All @@ -49,8 +48,7 @@ async fn dry_run() {
];
let script: Vec<u8> = script
.iter()
.map(|op| u32::from(*op).to_be_bytes())
.flatten()
.flat_map(|op| u32::from(*op).to_be_bytes())
.collect();

let tx = fuel_tx::Transaction::script(
Expand Down Expand Up @@ -97,8 +95,7 @@ async fn submit() {
];
let script: Vec<u8> = script
.iter()
.map(|op| u32::from(*op).to_be_bytes())
.flatten()
.flat_map(|op| u32::from(*op).to_be_bytes())
.collect();

let tx = fuel_tx::Transaction::script(
Expand Down
11 changes: 5 additions & 6 deletions fuel-core/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,16 @@ impl Executor {
..
} = input
{
let block_created;
if self.config.utxo_validation {
block_created = Storage::<UtxoId, Coin>::get(db, utxo_id)?
let block_created = if self.config.utxo_validation {
Storage::<UtxoId, Coin>::get(db, utxo_id)?
.ok_or(Error::TransactionValidity(
TransactionValidityError::CoinDoesntExist,
))?
.block_created;
.block_created
} else {
// if utxo validation is disabled, just assign this new input to the original block
block_created = Default::default();
}
Default::default()
};

Storage::<UtxoId, Coin>::insert(
db,
Expand Down
1 change: 1 addition & 0 deletions fuel-core/src/schema/tx/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ impl Transaction {
Ok(status.map(Into::into))
}

#[allow(clippy::unnecessary_to_owned)]
async fn receipts(
&self,
ctx: &Context<'_>,
Expand Down

0 comments on commit 034f90f

Please sign in to comment.