mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Remove unused runtime args field
This commit is contained in:
parent
a94c9d6d54
commit
a3f0f279a8
1 changed files with 2 additions and 5 deletions
|
@ -100,7 +100,6 @@ impl RuntimeInner {
|
||||||
*/
|
*/
|
||||||
pub struct Runtime {
|
pub struct Runtime {
|
||||||
inner: RuntimeInner,
|
inner: RuntimeInner,
|
||||||
args: Vec<String>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Runtime {
|
impl Runtime {
|
||||||
|
@ -114,7 +113,6 @@ impl Runtime {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
inner: RuntimeInner::create().expect("Failed to create runtime"),
|
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.
|
Sets arguments to give in `process.args` for Lune scripts.
|
||||||
*/
|
*/
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn with_args<V>(mut self, args: V) -> Self
|
pub fn with_args<V>(self, args: V) -> Self
|
||||||
where
|
where
|
||||||
V: Into<Vec<String>>,
|
V: Into<Vec<String>>,
|
||||||
{
|
{
|
||||||
self.args = args.into();
|
self.inner.lua().set_app_data(args.into());
|
||||||
self.inner.lua().set_app_data(self.args.clone());
|
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue