remove error on "wrong" main function args (which are no longer "wrong" since the last commit)

This commit is contained in:
mark 2023-06-17 15:35:42 +02:00
parent 47dc763b23
commit 701ead37c1
2 changed files with 0 additions and 8 deletions

View File

@ -427,9 +427,6 @@ pub struct RScript {
}
impl RScript {
pub fn new(main: RFunction, info: GSInfo) -> Result<Self, ToRunnableError> {
if main.inputs.len() != 1 {
return Err(ToRunnableError::MainWrongInput);
}
Ok(Self { main, info })
}
pub fn run(&self, args: Vec<VData>) -> VData {

View File

@ -21,7 +21,6 @@ use super::{
};
pub enum ToRunnableError {
MainWrongInput,
UseOfUndefinedVariable(String),
UseOfUndefinedFunction(String),
UnknownType(String),
@ -63,10 +62,6 @@ impl FormatGs for ToRunnableError {
file: Option<&crate::parsing::file::File>,
) -> std::fmt::Result {
match self {
Self::MainWrongInput => write!(
f,
"Main function had the wrong input. This is a bug and should never happen."
),
Self::UseOfUndefinedVariable(v) => {
write!(f, "Cannot use variable \"{v}\" as it isn't defined (yet?).")
}