mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-11 23:31:10 +00:00
fix
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
//! This module implements a cached file system allowing for results to be stored in-memory rather
|
||||
//! rather being queried from the file system again.
|
||||
|
||||
use std::fs;
|
||||
use std::io::{Error, Result};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::{
|
||||
fs,
|
||||
io::{Error, Result},
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use moka::sync::Cache;
|
||||
use once_cell::sync::Lazy;
|
||||
@@ -25,10 +27,7 @@ pub fn read(path: impl AsRef<Path>) -> Result<Vec<u8>> {
|
||||
pub fn read_to_string(path: impl AsRef<Path>) -> Result<String> {
|
||||
let content = read(path)?;
|
||||
String::from_utf8(content).map_err(|_| {
|
||||
Error::new(
|
||||
std::io::ErrorKind::InvalidData,
|
||||
"The contents of the file are not valid UTF8",
|
||||
)
|
||||
Error::new(std::io::ErrorKind::InvalidData, "The contents of the file are not valid UTF8")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,7 @@ pub fn clear_directory(path: impl AsRef<Path>) -> Result<()> {
|
||||
.with_context(|| format!("Failed to read directory: {}", path.as_ref().display()))?
|
||||
{
|
||||
let entry = entry.with_context(|| {
|
||||
format!(
|
||||
"Failed to read an entry in directory: {}",
|
||||
path.as_ref().display()
|
||||
)
|
||||
format!("Failed to read an entry in directory: {}", path.as_ref().display())
|
||||
})?;
|
||||
let entry_path = entry.path();
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use std::ops::ControlFlow;
|
||||
use std::time::Duration;
|
||||
use std::{ops::ControlFlow, time::Duration};
|
||||
|
||||
use anyhow::{Context as _, Result, anyhow};
|
||||
|
||||
@@ -38,10 +37,7 @@ where
|
||||
));
|
||||
}
|
||||
|
||||
match future()
|
||||
.await
|
||||
.context("Polled future returned an error during polling loop")?
|
||||
{
|
||||
match future().await.context("Polled future returned an error during polling loop")? {
|
||||
ControlFlow::Continue(()) => {
|
||||
let next_wait_duration = match polling_wait_behavior {
|
||||
PollingWaitBehavior::Constant(duration) => duration,
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
use crate::types::VersionOrRequirement;
|
||||
use semver::Version;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt::Display;
|
||||
use std::str::FromStr;
|
||||
use std::sync::LazyLock;
|
||||
use std::{fmt::Display, str::FromStr, sync::LazyLock};
|
||||
|
||||
/// This represents a mode that a given test should be run with, if possible.
|
||||
///
|
||||
@@ -78,9 +76,7 @@ impl FromStr for ModePipeline {
|
||||
// Don't go via Yul IR
|
||||
"E" => Ok(ModePipeline::ViaEVMAssembly),
|
||||
// Anything else that we see isn't a mode at all
|
||||
_ => Err(anyhow::anyhow!(
|
||||
"Unsupported pipeline '{s}': expected 'Y' or 'E'"
|
||||
)),
|
||||
_ => Err(anyhow::anyhow!("Unsupported pipeline '{s}': expected 'Y' or 'E'")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use alloy::primitives::U256;
|
||||
use alloy::signers::local::PrivateKeySigner;
|
||||
use alloy::{primitives::U256, signers::local::PrivateKeySigner};
|
||||
use anyhow::{Context, Result, bail};
|
||||
|
||||
/// This is a sequential private key allocator. When instantiated, it allocated private keys in
|
||||
|
||||
Reference in New Issue
Block a user