Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Jan 20, 2025
1 parent b59c0a7 commit 874ae92
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion compatibility/src/version_five/state_snapshot_v5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ pub struct AccountStateBlobRecord(HashValueV5, AccountStateBlob);
////// SNAPSHOT FILE IO //////
/// read snapshot manifest file into struct
pub fn v5_read_from_snapshot_manifest(path: &Path) -> Result<StateSnapshotBackupV5, Error> {
let config = std::fs::read_to_string(path).context(format!("Error: cannot read file at {:?}", &path))?;
let config =
std::fs::read_to_string(path).context(format!("Error: cannot read file at {:?}", &path))?;

let map: StateSnapshotBackupV5 = serde_json::from_str(&config)?;

Expand Down
4 changes: 2 additions & 2 deletions compatibility/src/version_five/transaction_manifest_v5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ impl TransactionBackup {
////// TX FILES IO //////
/// read tx manifest file into struct
pub fn v5_read_from_transaction_manifest(path: &Path) -> Result<TransactionBackup> {
let config = std::fs::read_to_string(path).context(
format!("Error: cannot read file {:?}", &path))?;
let config =
std::fs::read_to_string(path).context(format!("Error: cannot read file {:?}", &path))?;

let map: TransactionBackup = serde_json::from_str(&config)?;

Expand Down
9 changes: 5 additions & 4 deletions framework/src/builder/framework_generate_upgrade_proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,11 @@ pub fn write_to_file(result: Vec<(String, String)>, proposal_dir: PathBuf) -> an
Ok(())
}
/// Need to create a dummy package so that we can build the script into bytecode
/// so that we can then get the hash of the script.
/// ... so that we can then submit it as part of a proposal framework/libra-framework/sources/modified_source/diem_governance.move
/// ... so that then the VM doesn't complain about its size /diem-move/diem-vm/src/diem_vm_impl.rs
/// ... and so that when the proposal is approved a third party can execute the source upgrade.
/// so that:
/// * we can then get the hash of the script.
/// * then submit it as part of a proposal framework/libra-framework/sources/modified_source/diem_governance.move
/// * then the VM doesn't complain about its size /diem-move/diem-vm/src/diem_vm_impl.rs
/// * and so that when the proposal is approved a third party can execute the source upgrade.
pub fn init_move_dir_wrapper(
package_dir: PathBuf,
script_name: &str,
Expand Down
3 changes: 2 additions & 1 deletion tools/storage/src/read_tx_chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ use libra_backwards_compatibility::version_five::state_snapshot_v5::open_for_rea

/// read snapshot manifest file into object
pub fn load_tx_chunk_manifest(path: &Path) -> anyhow::Result<TransactionBackup> {
let s = std::fs::read_to_string(path).context(format!("Error: cannot read file at {:?}", path))?;
let s =
std::fs::read_to_string(path).context(format!("Error: cannot read file at {:?}", path))?;

let map: TransactionBackup = serde_json::from_str(&s)?;

Expand Down

0 comments on commit 874ae92

Please sign in to comment.