diff --git a/cli_utils/Cargo.lock b/cli_utils/Cargo.lock index c385582180..86ed98ed87 100644 --- a/cli_utils/Cargo.lock +++ b/cli_utils/Cargo.lock @@ -897,6 +897,12 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +[[package]] +name = "dunce" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541" + [[package]] name = "either" version = "1.6.1" @@ -2504,6 +2510,7 @@ dependencies = [ name = "roc_builtins" version = "0.1.0" dependencies = [ + "dunce", "roc_collections", "roc_module", "roc_region", @@ -2518,6 +2525,7 @@ dependencies = [ "bumpalo", "roc_builtins", "roc_collections", + "roc_error_macros", "roc_module", "roc_parse", "roc_problem", @@ -2587,6 +2595,7 @@ dependencies = [ "roc_builtins", "roc_can", "roc_collections", + "roc_error_macros", "roc_module", "roc_parse", "roc_region", @@ -2760,6 +2769,7 @@ dependencies = [ "roc_can", "roc_collections", "roc_constrain", + "roc_error_macros", "roc_module", "roc_mono", "roc_parse", diff --git a/code_markup/src/markup/attribute.rs b/code_markup/src/markup/attribute.rs index 0ac1e558a4..58f57bc206 100644 --- a/code_markup/src/markup/attribute.rs +++ b/code_markup/src/markup/attribute.rs @@ -47,36 +47,21 @@ pub struct UnderlineEnd { #[derive(Debug)] pub enum Attribute { // Rust does not yet support types for enum variants so we have to do it like this - Caret { - caret: Caret, - }, + Caret { caret: Caret }, - SelectionStart { - selection_start: SelectionStart, - }, - SelectionEnd { - selection_end: SelectionEnd, - }, + SelectionStart { selection_start: SelectionStart }, + SelectionEnd { selection_end: SelectionEnd }, - HighlightStart { - highlight_start: HighlightStart, - }, - HighlightEnd { - highlight_end: HighlightEnd, - }, + HighlightStart { highlight_start: HighlightStart }, + HighlightEnd { highlight_end: HighlightEnd }, - Underline { - underline_spec: UnderlineSpec, - }, + Underline { underline_spec: UnderlineSpec }, } #[derive(Debug)] pub enum UnderlineSpec { - Partial{ - start: usize, - end: usize, - }, - Full + Partial { start: usize, end: usize }, + Full, } #[derive(Debug, Default)] diff --git a/editor/src/editor/render_ast.rs b/editor/src/editor/render_ast.rs index ab44e2a5b7..d66457a79e 100644 --- a/editor/src/editor/render_ast.rs +++ b/editor/src/editor/render_ast.rs @@ -147,9 +147,7 @@ fn markup_to_wgpu_helper<'a>( for attribute in &attributes.all { match attribute { - Attribute::Underline { - underline_spec: _, - } => { + Attribute::Underline { underline_spec: _ } => { // TODO use underline_spec let top_left_coords = ( code_style.txt_coords.x + (txt_row_col.1 as f32) * char_width,