Skip to content

Commit

Permalink
Fix misc clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed May 15, 2023
1 parent 1c847e5 commit 7388fd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/src/chunking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,11 +661,7 @@ fn basic_packing<'a>(
let limit_new_bins = 1usize;
let _limit_new_pkgs = 0usize;
let limit_max_frequency_pkgs = max_freq_components.len();
let limit_max_frequency_bins = if limit_max_frequency_pkgs > 0 {
1usize
} else {
0usize
};
let limit_max_frequency_bins = limit_max_frequency_pkgs.min(1);
let limit_hs_bins = (0.6
* (bin_size.get()
- (limit_ls_bins + limit_new_bins + limit_max_frequency_bins) as u32)
Expand All @@ -674,9 +670,8 @@ fn basic_packing<'a>(
let limit_ms_bins = (bin_size.get()
- (limit_hs_bins + limit_ls_bins + limit_new_bins + limit_max_frequency_bins)
as u32) as usize;
let partitions =
get_partitions_with_threshold(components, limit_hs_bins as usize, 2f64)
.expect("Partitioning components into sets");
let partitions = get_partitions_with_threshold(components, limit_hs_bins, 2f64)
.expect("Partitioning components into sets");

let limit_ls_pkgs = match partitions.get(LOW_PARTITION) {
Some(n) => n.len(),
Expand Down
1 change: 1 addition & 0 deletions lib/src/container/encapsulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ fn export_chunked(

/// Generate an OCI image from a given ostree root
#[context("Building oci")]
#[allow(clippy::too_many_arguments)]
fn build_oci(
repo: &ostree::Repo,
rev: &str,
Expand Down

0 comments on commit 7388fd0

Please sign in to comment.