Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions implants/lib/eldritch/src/file/read_impl.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
use anyhow::{Context, Result};
use anyhow::Result;
use glob::{glob, GlobError};
use std::{fs, path::PathBuf};

/*
if !entry_path.exists() {
return Err(anyhow::anyhow!(
"file.read: pattern {} could not find path {}",
path,
entry_path.to_str().context("Failed to convert to str")?
));
}
*/

pub fn read(path: String) -> Result<String> {
let mut res: String = String::from("");
let glob_res = glob(&path)?.collect::<Vec<Result<PathBuf, GlobError>>>();
Expand Down
2 changes: 1 addition & 1 deletion implants/lib/eldritch/src/runtime/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ pub struct Runtime {
#[starlark_module]
fn error_handler(builder: &mut GlobalsBuilder) {
#[allow(unused_variables)]
fn eprint(starlark_eval: &mut Evaluator<'v, '_>, message: String) -> anyhow::Result<NoneType> {
fn eprint(starlark_eval: &mut Evaluator<'_, '_>, message: String) -> anyhow::Result<NoneType> {
let env = crate::runtime::Environment::from_extra(starlark_eval.extra)?;
eprint_impl::eprint(env, message)?;
Ok(NoneType {})
Expand Down