Skip to content

Commit

Permalink
removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
lexa-diky committed Jul 11, 2024
1 parent e0a7df8 commit 5c291f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
2 changes: 1 addition & 1 deletion src/compiler/native_fn/implementation/eval.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::compiler::compiler_source::LiteralCompilerSource;
use crate::compiler::native_fn::{
get_argument_at, Error, NativeFunction, NativeFunctionDefinition, NativeFunctionSignature,
Error, NativeFunction, NativeFunctionDefinition, NativeFunctionSignature,
};
use crate::util::byte_buffer::ByteBuffer;

Expand Down
22 changes: 0 additions & 22 deletions src/compiler/native_fn/implementations.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::collections::HashMap;
use std::fs::File;
use std::io::Read;

Expand Down Expand Up @@ -112,24 +111,3 @@ pub(crate) fn create_pad_native_function() -> NativeFunction {
},
)
}

pub(crate) fn get_argument_at<'a>(
arguments: &'a HashMap<String, ByteBuffer>,
pos: usize,
fn_name: &str,
) -> Result<&'a ByteBuffer, Error> {
arguments
.get(&pos.to_string())
.ok_or_else(|| Error::MissingArgument {
name: pos.to_string(),
available_arguments: arguments.keys().cloned().collect(),
function_name: fn_name.to_string(),
})
}

pub(crate) fn get_named_argument<'a>(
arguments: &'a HashMap<String, ByteBuffer>,
name: &str,
) -> Option<&'a ByteBuffer> {
arguments.get(name)
}

0 comments on commit 5c291f8

Please sign in to comment.