From a3f0f279a8eca75974bcaf244432b05f411d6ec6 Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Wed, 5 Jun 2024 18:51:37 +0200 Subject: [PATCH] Remove unused runtime args field --- crates/lune/src/rt/runtime.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/lune/src/rt/runtime.rs b/crates/lune/src/rt/runtime.rs index 5d515ca..53a5970 100644 --- a/crates/lune/src/rt/runtime.rs +++ b/crates/lune/src/rt/runtime.rs @@ -100,7 +100,6 @@ impl RuntimeInner { */ pub struct Runtime { inner: RuntimeInner, - args: Vec, } impl Runtime { @@ -114,7 +113,6 @@ impl Runtime { pub fn new() -> Self { Self { inner: RuntimeInner::create().expect("Failed to create runtime"), - args: Vec::new(), } } @@ -122,12 +120,11 @@ impl Runtime { Sets arguments to give in `process.args` for Lune scripts. */ #[must_use] - pub fn with_args(mut self, args: V) -> Self + pub fn with_args(self, args: V) -> Self where V: Into>, { - self.args = args.into(); - self.inner.lua().set_app_data(self.args.clone()); + self.inner.lua().set_app_data(args.into()); self }