Readme and clippy cleanups

This commit is contained in:
Ava Apples Affine 2023-05-28 23:22:49 +00:00
parent cbd52de91b
commit 8cc0202a7b
13 changed files with 159 additions and 197 deletions

View file

@ -42,7 +42,7 @@ fn concat_callback(ast: &Seg, _syms: &mut SymTable) -> Result<Ctr, Traceback> {
match arg {
// should be a thing here
Ctr::Symbol(_) => return false,
Ctr::String(s) => string.push_str(&s),
Ctr::String(s) => string.push_str(s),
Ctr::Integer(i) => string.push_str(&i.to_string()),
Ctr::Float(f) => string.push_str(&f.to_string()),
Ctr::Bool(b) => string.push_str(&b.to_string()),
@ -56,7 +56,7 @@ fn concat_callback(ast: &Seg, _syms: &mut SymTable) -> Result<Ctr, Traceback> {
("concat", "highly suspicious that an input was an unevaluated symbol")
.into()))
}
return Ok(Ctr::String(string));
Ok(Ctr::String(string))
}
const STRLEN_DOCSTRING: &str = "Takes a single arg of any type.
@ -147,7 +147,7 @@ fn split_callback(ast: &Seg, _syms: &mut SymTable) -> Result<Ctr, Traceback> {
.into()))
}
if let Ctr::String(ref s) = &*second_arg_obj {
if let Ctr::String(ref s) = second_arg_obj {
delim_str = s.clone();
} else {
return Err(start_trace(
@ -174,7 +174,7 @@ fn input_callback(ast: &Seg, _syms: &mut SymTable) -> Result<Ctr, Traceback> {
io::stdin().read_line(&mut input).expect("couldnt read user input");
Ok(Ctr::String(input.trim().to_string()))
} else {
return Err(start_trace(
Err(start_trace(
("input", "expected a string input to prompt user with")
.into()))
}