Skip to content

Commit

Permalink
Fix clippy after 1.83 rust update
Browse files Browse the repository at this point in the history
  • Loading branch information
noituri committed Nov 28, 2024
1 parent f1d3aba commit d4c17df
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion compositor_chromium/src/v8/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl V8Context {

pub struct V8ContextEntered<'a>(&'a V8Context);

impl<'a> Drop for V8ContextEntered<'a> {
impl Drop for V8ContextEntered<'_> {
fn drop(&mut self) {
unsafe {
match self.0.inner.get() {
Expand Down
2 changes: 1 addition & 1 deletion compositor_render/src/scene/tiles_component/tiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl TilesComponentParams {
/// preserving tile aspect_ratio
fn optimal_row_column_count(&self, inputs_count: u32, layout_size: Size) -> RowsCols {
fn from_rows_count(inputs_count: u32, rows: u32) -> RowsCols {
let columns = (inputs_count + rows - 1) / rows;
let columns = inputs_count.div_ceil(rows);
RowsCols { rows, columns }
}
let mut best_rows_cols = from_rows_count(inputs_count, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl WebRenderer {
fn prepare_textures<'a>(
&'a self,
sources: &'a [&NodeTexture],
) -> Vec<(Option<&Texture>, RenderInfo)> {
) -> Vec<(Option<&'a Texture>, RenderInfo)> {
let mut source_info = sources
.iter()
.zip(self.source_transforms.lock().unwrap().iter())
Expand Down
2 changes: 1 addition & 1 deletion compositor_render/src/wgpu/texture/planar_yuv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ where
_phantom: PhantomData<&'a F>,
}

impl<'a, F, E> YuvPendingDownload<'a, F, E>
impl<F, E> YuvPendingDownload<'_, F, E>
where
F: FnOnce() -> Result<Bytes, E>,
{
Expand Down
2 changes: 1 addition & 1 deletion generate/src/bin/generate_from_types/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub struct MarkdownGenerator<'a> {
config: &'a DocsConfig,
}

impl<'a> MarkdownGenerator<'a> {
impl MarkdownGenerator<'_> {
const INDENT_SIZE: usize = 2;

pub fn generate(definition: TypeDefinition, config: &DocsConfig) -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::definition::{Kind, TypeDefinition};

use super::MarkdownGenerator;

impl<'a> MarkdownGenerator<'a> {
impl MarkdownGenerator<'_> {
pub(super) fn write_properties(&mut self, definition: &TypeDefinition) {
let name = definition.name.clone();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::definition::{Kind, TypeDefinition};

use super::MarkdownGenerator;

impl<'a> MarkdownGenerator<'a> {
impl MarkdownGenerator<'_> {
pub(super) fn write_type_definition(&mut self, def: TypeDefinition) {
if let Some(name) = &def.name {
if let Some(override_fn) = self.config.overrides.get(name.as_str()) {
Expand Down
2 changes: 1 addition & 1 deletion vk-video/src/vulkan_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub enum VulkanDecoderError {
VulkanCtxError(#[from] VulkanCtxError),
}

impl<'a> VulkanDecoder<'a> {
impl VulkanDecoder<'_> {
pub fn new(vulkan_ctx: Arc<VulkanDevice>) -> Result<Self, VulkanDecoderError> {
let decode_pool = Arc::new(CommandPool::new(
vulkan_ctx.device.clone(),
Expand Down
2 changes: 1 addition & 1 deletion vk-video/src/vulkan_decoder/wrappers/parameter_sets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ impl H264ProfileInfo<'_> {
}
}

impl<'a> Drop for H264ProfileInfo<'a> {
impl Drop for H264ProfileInfo<'_> {
fn drop(&mut self) {
unsafe {
let _ = Box::from_raw(self.h264_info_ptr);
Expand Down

0 comments on commit d4c17df

Please sign in to comment.