mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
clippy --fix fixes
This commit is contained in:
parent
9973d4b8d2
commit
4cd8f0a056
57 changed files with 366 additions and 374 deletions
|
@ -100,11 +100,11 @@ pub fn format(files: std::vec::Vec<PathBuf>, mode: FormatMode) -> Result<(), Str
|
|||
|
||||
let mut before_file = file.clone();
|
||||
before_file.set_extension("roc-format-failed-ast-before");
|
||||
std::fs::write(&before_file, &format!("{:#?}\n", ast_normalized)).unwrap();
|
||||
std::fs::write(&before_file, format!("{:#?}\n", ast_normalized)).unwrap();
|
||||
|
||||
let mut after_file = file.clone();
|
||||
after_file.set_extension("roc-format-failed-ast-after");
|
||||
std::fs::write(&after_file, &format!("{:#?}\n", reparsed_ast_normalized)).unwrap();
|
||||
std::fs::write(&after_file, format!("{:#?}\n", reparsed_ast_normalized)).unwrap();
|
||||
|
||||
internal_error!(
|
||||
"Formatting bug; formatting didn't reparse as the same tree\n\n\
|
||||
|
|
|
@ -1235,8 +1235,10 @@ fn run_wasm<I: Iterator<Item = S>, S: AsRef<[u8]>>(_wasm_path: &std::path::Path,
|
|||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, EnumIter, IntoStaticStr, PartialEq, Eq)]
|
||||
#[derive(Default)]
|
||||
pub enum Target {
|
||||
#[strum(serialize = "system")]
|
||||
#[default]
|
||||
System,
|
||||
#[strum(serialize = "linux32")]
|
||||
Linux32,
|
||||
|
@ -1248,11 +1250,7 @@ pub enum Target {
|
|||
Wasm32,
|
||||
}
|
||||
|
||||
impl Default for Target {
|
||||
fn default() -> Self {
|
||||
Target::System
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl Target {
|
||||
pub fn to_triple(self) -> Triple {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue