Skip to content

Commit

Permalink
Fixed clippy lint errors (needless_pass_by_ref_mut) (#517)
Browse files Browse the repository at this point in the history
* Fixed clippy lint errors (needless_pass_by_ref_mut)

* Fixed clippy lint errors (unnecessary_mut_passed)

(cherry picked from commit 8974878)
  • Loading branch information
inobelar authored and nicoburns committed Aug 13, 2023
1 parent f58f642 commit 8e41cdb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/compute/flexbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ fn compute_preliminary(
// 15. Determine the flex container’s used cross size.
#[cfg(feature = "debug")]
NODE_LOGGER.log("determine_container_cross_size");
let total_line_cross_size = determine_container_cross_size(&mut flex_lines, known_dimensions, &mut constants);
let total_line_cross_size = determine_container_cross_size(&flex_lines, known_dimensions, &mut constants);

// We have the container size.
// If our caller does not care about performing layout we are done now.
Expand Down Expand Up @@ -1436,7 +1436,7 @@ fn handle_align_content_stretch(flex_lines: &mut [FlexLine], node_size: Size<Opt
///
/// **Note that this step does not affect the main size of the flex item, even if it has an intrinsic aspect ratio**.
#[inline]
fn determine_used_cross_size(tree: &mut impl LayoutTree, flex_lines: &mut [FlexLine], constants: &AlgoConstants) {
fn determine_used_cross_size(tree: &impl LayoutTree, flex_lines: &mut [FlexLine], constants: &AlgoConstants) {
for line in flex_lines {
let line_cross_size = line.cross_size;

Expand Down Expand Up @@ -1595,7 +1595,7 @@ fn resolve_cross_axis_auto_margins(flex_lines: &mut [FlexLine], constants: &Algo
/// if neither of the item's cross-axis margins are `auto`.
#[inline]
fn align_flex_items_along_cross_axis(
child: &mut FlexItem,
child: &FlexItem,
free_space: f32,
max_baseline: f32,
constants: &AlgoConstants,
Expand Down Expand Up @@ -1653,7 +1653,7 @@ fn align_flex_items_along_cross_axis(
#[inline]
#[must_use]
fn determine_container_cross_size(
flex_lines: &mut [FlexLine],
flex_lines: &[FlexLine],
node_size: Size<Option<f32>>,
constants: &mut AlgoConstants,
) -> f32 {
Expand Down
4 changes: 2 additions & 2 deletions src/compute/grid/track_sizing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ where
/// Compute the item's resolved margins for size contributions. Horizontal percentage margins always resolve
/// to zero if the container size is indefinite as otherwise this would introduce a cyclic dependency.
#[inline(always)]
fn margins_axis_sums_with_baseline_shims(&self, item: &mut GridItem) -> Size<f32> {
fn margins_axis_sums_with_baseline_shims(&self, item: &GridItem) -> Size<f32> {
item.margins_axis_sums_with_baseline_shims(self.inner_node_size.width)
}

Expand Down Expand Up @@ -502,7 +502,7 @@ fn resolve_intrinsic_track_sizes(
tree: &mut impl LayoutTree,
axis: AbstractAxis,
axis_tracks: &mut [GridTrack],
other_axis_tracks: &mut [GridTrack],
other_axis_tracks: &[GridTrack],
items: &mut [GridItem],
axis_available_grid_space: AvailableSpace,
inner_node_size: Size<Option<f32>>,
Expand Down
2 changes: 1 addition & 1 deletion src/compute/grid/types/grid_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl GridItem {
/// allow percentage sizes further down the tree to resolve properly in some cases
fn known_dimensions(
&self,
tree: &mut impl LayoutTree,
tree: &impl LayoutTree,
inner_node_size: Size<Option<f32>>,
grid_area_size: Size<Option<f32>>,
) -> Size<Option<f32>> {
Expand Down
2 changes: 1 addition & 1 deletion src/compute/leaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl LayoutAlgorithm for LeafAlgorithm {

/// Compute the size of a leaf node (node with no children)
pub(crate) fn compute(
tree: &mut impl LayoutTree,
tree: &impl LayoutTree,
node: Node,
known_dimensions: Size<Option<f32>>,
parent_size: Size<Option<f32>>,
Expand Down

0 comments on commit 8e41cdb

Please sign in to comment.