Skip to content

Commit

Permalink
push version
Browse files Browse the repository at this point in the history
  • Loading branch information
NightProg committed Sep 16, 2023
1 parent 1ebfee0 commit 8ffd182
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/popper_builtin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct CustomBuiltin {
pub type Builtins = Vec<Box<dyn Builtin>>;


fn builtin_sum() -> CustomBuiltin {
fn builtin_sum() -> impl Builtin {
CustomBuiltin {
lang_name: "sum".to_string(),
program: vec![
Expand All @@ -56,7 +56,7 @@ fn builtin_sum() -> CustomBuiltin {
}
}

fn builtin_print() -> CustomBuiltin {
fn builtin_print() -> impl Builtin {
CustomBuiltin {
lang_name: "print".to_string(),
program: vec![
Expand All @@ -73,14 +73,14 @@ fn builtin_print() -> CustomBuiltin {
}

pub fn builtins() -> Builtins {
dbg!(vec![
vec![
Box::new(
builtin_print()
),
Box::new(
builtin_sum()
)
])
]
}

pub fn get_builtin(lang_name: &str, builtins: Builtins) -> Option<Box<dyn Builtin>> {
Expand Down

0 comments on commit 8ffd182

Please sign in to comment.