Skip to content

Commit

Permalink
fix: ring_bufferの内容をstd::mem::takeを使用してdrainするように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
yud0uhu committed Nov 21, 2024
1 parent 78f90be commit 2560841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nusamai/src/sink/cesiumtiles/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ fn slice_polygon(
let snapped_vertex = snap_to_tile_boundary(*vertex, &tile_bounds);
ring_buffer.push(snapped_vertex);
}
let drained_ring: Vec<_> = ring_buffer.drain(..).collect();
let drained_ring: Vec<_> = std::mem::take(&mut ring_buffer).drain(..).collect();
poly_buf.add_ring(drained_ring);
}

Expand Down

0 comments on commit 2560841

Please sign in to comment.