about summary refs log tree commit diff stats
path: root/crates/libmpv2/src/mpv/render.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-14 18:05:33 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-14 18:05:33 +0200
commit2c7980b773cad586af5db8ff0755f1d74d94f7d1 (patch)
tree5207aa3a69945ae7d5e5ef77ad14a50313954c25 /crates/libmpv2/src/mpv/render.rs
parentfeat(unreachable): Init trait (diff)
downloadyt-2c7980b773cad586af5db8ff0755f1d74d94f7d1.tar.gz
yt-2c7980b773cad586af5db8ff0755f1d74d94f7d1.zip
refactor(treewide): Conform to the clippy and rust lints
Diffstat (limited to 'crates/libmpv2/src/mpv/render.rs')
-rw-r--r--crates/libmpv2/src/mpv/render.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/libmpv2/src/mpv/render.rs b/crates/libmpv2/src/mpv/render.rs
index 91db34e..c3f2dc9 100644
--- a/crates/libmpv2/src/mpv/render.rs
+++ b/crates/libmpv2/src/mpv/render.rs
@@ -213,8 +213,8 @@ impl RenderContext {
         params: impl IntoIterator<Item = RenderParam<C>>,
     ) -> Result<Self> {
         let params: Vec<_> = params.into_iter().collect();
-        let mut raw_params: Vec<libmpv2_sys::mpv_render_param> = Vec::new();
-        raw_params.reserve(params.len() + 1);
+        let mut raw_params: Vec<libmpv2_sys::mpv_render_param> =
+            Vec::with_capacity(params.len() + 1);
         let mut raw_ptrs: HashMap<*const c_void, DeleterFn> = HashMap::new();
 
         for p in params {