mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 14:13:52 +01:00
fix get having wrong return type
This commit is contained in:
parent
cb52c961a2
commit
c652c618d2
@ -1,7 +1,7 @@
|
|||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
data::{self, Data, MersType},
|
data::{self, Data, MersType, Type},
|
||||||
program::{self, run::CheckInfo},
|
program::{self, run::CheckInfo},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -15,9 +15,12 @@ impl Config {
|
|||||||
Data::new(data::function::Function {
|
Data::new(data::function::Function {
|
||||||
info: Arc::new(program::run::Info::neverused()),
|
info: Arc::new(program::run::Info::neverused()),
|
||||||
info_check: Arc::new(Mutex::new(CheckInfo::neverused())),
|
info_check: Arc::new(Mutex::new(CheckInfo::neverused())),
|
||||||
out: Arc::new(|a, i| {
|
out: Arc::new(|a, _i| {
|
||||||
if let Some(v) = a.get() {
|
if let Some(v) = a.get() {
|
||||||
Ok(v)
|
Ok(Type::newm(vec![
|
||||||
|
Arc::new(data::tuple::TupleT(vec![v])),
|
||||||
|
Arc::new(data::tuple::TupleT(vec![])),
|
||||||
|
]))
|
||||||
} else {
|
} else {
|
||||||
Err(format!("called get on non-gettable type {a}").into())
|
Err(format!("called get on non-gettable type {a}").into())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user