Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
sesi200 committed Oct 9, 2024
1 parent 0b244be commit b34074d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/canisters/frontend/ic-asset/src/batch_upload/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,16 @@ pub(crate) struct ProjectAsset {
pub(crate) encodings: HashMap<String, ProjectAssetEncoding>,
}

type IdMapping = BTreeMap<usize, Nat>;
type UploadQueue = Vec<(usize, Vec<u8>)>;
pub(crate) struct ChunkUploader<'agent> {
canister: Canister<'agent>,
batch_id: Nat,
chunks: Arc<AtomicUsize>,
bytes: Arc<AtomicUsize>,
// maps uploader_chunk_id to canister_chunk_id
id_mapping: Arc<Mutex<BTreeMap<usize, Nat>>>,
upload_queue: Arc<Mutex<Vec<(usize, Vec<u8>)>>>,
id_mapping: Arc<Mutex<IdMapping>>,
upload_queue: Arc<Mutex<UploadQueue>>,
}

impl<'agent> ChunkUploader<'agent> {
Expand Down

0 comments on commit b34074d

Please sign in to comment.