formatting & clippy

This commit is contained in:
Brian Carroll 2023-09-09 16:03:54 +01:00
parent adc97a0099
commit 6a47a99114
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
2 changed files with 13 additions and 5 deletions

View file

@ -8,8 +8,10 @@ use roc_load::MonomorphizedModule;
use roc_mono::ir::OptLevel;
use roc_repl_eval::gen::Problems;
use roc_repl_ui::repl_state::{ReplAction, ReplState};
use roc_repl_ui::{is_incomplete, format_output, CONT_PROMPT, PROMPT, SHORT_INSTRUCTIONS, TIPS, WELCOME_MESSAGE};
use roc_reporting::report::{DEFAULT_PALETTE, ANSI_STYLE_CODES};
use roc_repl_ui::{
format_output, is_incomplete, CONT_PROMPT, PROMPT, SHORT_INSTRUCTIONS, TIPS, WELCOME_MESSAGE,
};
use roc_reporting::report::{ANSI_STYLE_CODES, DEFAULT_PALETTE};
use roc_target::TargetInfo;
use rustyline::highlight::{Highlighter, PromptInfo};
use rustyline::validate::{self, ValidationContext, ValidationResult, Validator};
@ -103,7 +105,13 @@ pub fn evaluate(
dimensions: Option<(usize, usize)>,
) -> String {
let opt_output = opt_mono.and_then(|mono| eval_llvm(mono, target, OptLevel::Normal));
format_output(ANSI_STYLE_CODES, opt_output, problems, opt_var_name, dimensions)
format_output(
ANSI_STYLE_CODES,
opt_output,
problems,
opt_var_name,
dimensions,
)
}
#[derive(Default)]

View file

@ -151,7 +151,7 @@ fn complete(input: &str, state: &mut ReplState, expected_start: &str, expected_e
);
}
_ => {
assert!(false, "Unexpected action: {:?}", action);
panic!("Unexpected action: {:?}", action);
}
}
}
@ -190,7 +190,7 @@ fn error(input: &str, state: &mut ReplState, expected_step_result: String) {
assert_eq!(expected_step_result, escaped);
}
_ => {
assert!(false, "Unexpected action: {:?}", action);
panic!("Unexpected action: {:?}", action);
}
}
}