Apply rustfmt

Reviewed By: zertosh, passy

Differential Revision: D37579214

fbshipit-source-id: 0e52bd2b27abbbde32f77b073d3ed5ef33f4d318
This commit is contained in:
Stiopa Koltsov
2022-07-01 09:21:52 -07:00
committed by Facebook GitHub Bot
parent 583fdd9648
commit 873c03396e
3 changed files with 19 additions and 7 deletions

View File

@@ -5,7 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
use crate::types::{PackType, Platform};
use crate::types::PackType;
use crate::types::Platform;
use std::fmt;
use std::path::PathBuf;

View File

@@ -13,14 +13,23 @@ mod error;
mod tarsum;
mod types;
use anyhow::{bail, Context, Result};
use rayon::prelude::{IntoParallelIterator, ParallelIterator};
use anyhow::bail;
use anyhow::Context;
use anyhow::Result;
use rayon::prelude::IntoParallelIterator;
use rayon::prelude::ParallelIterator;
use std::collections::BTreeMap;
use std::ffi;
use std::fs::File;
use std::io::{self, BufReader, BufWriter, Write};
use std::io::BufReader;
use std::io::BufWriter;
use std::io::Write;
use std::io::{self};
use std::path;
use types::{HashSum, PackMode, PackType, Platform};
use types::HashSum;
use types::PackMode;
use types::PackType;
use types::Platform;
const DEFAULT_PACKLIST: &str = include_str!("packlist.yaml");
// This is to ensure that all progress bar prefixes are aligned.
@@ -221,7 +230,8 @@ fn pack_platform_exact(
/// Calculate the sha256 checksum of a file represented by a Reader.
fn sha256_digest<R: io::Read>(mut reader: &mut R) -> Result<HashSum> {
use sha2::{Digest, Sha256};
use sha2::Digest;
use sha2::Sha256;
let mut sha256 = Sha256::new();
std::io::copy(&mut reader, &mut sha256)?;

View File

@@ -5,7 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
use std::fmt::{self, Display};
use std::fmt::Display;
use std::fmt::{self};
use std::str;
#[derive(Eq, PartialEq, Debug, PartialOrd, Ord, Clone, serde::Deserialize)]