diff --git a/crates/mabo-build/src/lib.rs b/crates/mabo-build/src/lib.rs index 12cb203..7f4cc4e 100644 --- a/crates/mabo-build/src/lib.rs +++ b/crates/mabo-build/src/lib.rs @@ -23,7 +23,7 @@ pub enum Error { /// Failed to load the Mabo project. #[error("failed to load the Mabo project")] LoadProject(#[source] mabo_project::Error), - /// The required OUT_DIR env var doesn't exist. + /// The required `OUT_DIR` env var doesn't exist. #[error("missing OUT_DIR environment variable")] NoOutDir, /// The file name resulting from a glob pattern didn't produce a usable file path. diff --git a/crates/mabo-doc/src/templates.rs b/crates/mabo-doc/src/templates.rs index d6dc8b5..68cc81d 100644 --- a/crates/mabo-doc/src/templates.rs +++ b/crates/mabo-doc/src/templates.rs @@ -216,17 +216,6 @@ fn merge_comments(item: &[&str]) -> String { }) } -struct MergeComments<'a>(&'a [&'a str]); - -impl Display for MergeComments<'_> { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - for line in self.0 { - writeln!(f, "{line}")?; - } - Ok(()) - } -} - struct PrintField<'a>(&'a Field<'a>, FieldKind); impl Display for PrintField<'_> { diff --git a/crates/mabo-parser/src/ext.rs b/crates/mabo-parser/src/ext.rs index c6857ec..54e658b 100644 --- a/crates/mabo-parser/src/ext.rs +++ b/crates/mabo-parser/src/ext.rs @@ -14,11 +14,6 @@ pub(crate) trait ParserExt { where G: Fn(usize, E) -> E2, Self: Parser + Sized; - - fn map_err_input(self, map: G) -> MapErrInput - where - G: Fn(I, E) -> E2, - Self: Parser + Sized; } impl ParserExt for T { @@ -39,15 +34,6 @@ impl ParserExt for T { { MapErrLoc::new(self, map) } - - #[inline(always)] - fn map_err_input(self, map: G) -> MapErrInput - where - G: Fn(I, E) -> E2, - Self: Parser + Sized, - { - MapErrInput::new(self, map) - } } pub(crate) struct MapErr @@ -140,49 +126,3 @@ where } } } - -pub(crate) struct MapErrInput -where - F: Parser, - G: Fn(I, E) -> E2, -{ - parser: F, - map: G, - i: PhantomData, - o: PhantomData, - e: PhantomData, - e2: PhantomData, -} - -impl MapErrInput -where - F: Parser, - G: Fn(I, E) -> E2, -{ - #[inline(always)] - pub(crate) fn new(parser: F, map: G) -> Self { - Self { - parser, - map, - i: PhantomData, - o: PhantomData, - e: PhantomData, - e2: PhantomData, - } - } -} - -impl Parser for MapErrInput -where - F: Parser, - G: Fn(I, E) -> E2, - I: Copy, -{ - #[inline] - fn parse_next(&mut self, i: &mut I) -> PResult { - match self.parser.parse_next(i) { - Ok(o) => Ok(o), - Err(e) => Err(e.map(|e| (self.map)(*i, e))), - } - } -} diff --git a/crates/mabo-project/src/lib.rs b/crates/mabo-project/src/lib.rs index 3964d6d..745e37f 100644 --- a/crates/mabo-project/src/lib.rs +++ b/crates/mabo-project/src/lib.rs @@ -90,7 +90,7 @@ pub struct Package { #[serde(default, deserialize_with = "de::spdx_expression_opt")] pub license: Option, /// List of files that make up the schema package. These are not regular file paths but glob - /// patterns, meaning that file trees can be defined in a consise way like `schemas/**/*.mabo`. + /// patterns, meaning that file trees can be defined in a concise way like `schemas/**/*.mabo`. /// /// Regardless of the [glob pattern](https://en.wikipedia.org/wiki/Glob_(programming)) defined /// the final file list is always filtered by the `.mabo` file extension. diff --git a/vscode-extension/schemas/mabo.json b/vscode-extension/schemas/mabo.json index 7204c9a..60d6fdf 100644 --- a/vscode-extension/schemas/mabo.json +++ b/vscode-extension/schemas/mabo.json @@ -49,12 +49,12 @@ }, "Files": { "title": "Files", - "description": "List of files that make up the schema package. These are not regular file paths but glob patterns, meaning that\nfile trees can be defined in a consise way like `schemas/**/*.mabo`.\n\nRegardless of the [glob pattern](https://en.wikipedia.org/wiki/Glob_(programming)) defined the final file list is\nalways filtered by the `.mabo` file extension.\n", + "description": "List of files that make up the schema package. These are not regular file paths but glob patterns, meaning that\nfile trees can be defined in a concise way like `schemas/**/*.mabo`.\n\nRegardless of the [glob pattern](https://en.wikipedia.org/wiki/Glob_(programming)) defined the final file list is\nalways filtered by the `.mabo` file extension.\n", "type": "array", "items": [ { "type": "string", - "description": "List of files that make up the schema package. These are not regular file paths but glob patterns, meaning that\nfile trees can be defined in a consise way like `schemas/**/*.mabo`.\n\nRegardless of the [glob pattern](https://en.wikipedia.org/wiki/Glob_(programming)) defined the final file list is\nalways filtered by the `.mabo` file extension.\n" + "description": "List of files that make up the schema package. These are not regular file paths but glob patterns, meaning that\nfile trees can be defined in a concise way like `schemas/**/*.mabo`.\n\nRegardless of the [glob pattern](https://en.wikipedia.org/wiki/Glob_(programming)) defined the final file list is\nalways filtered by the `.mabo` file extension.\n" } ] } diff --git a/vscode-extension/schemas/mabo.yaml b/vscode-extension/schemas/mabo.yaml index 3858584..a572299 100644 --- a/vscode-extension/schemas/mabo.yaml +++ b/vscode-extension/schemas/mabo.yaml @@ -52,7 +52,7 @@ definitions: title: Files description: &filesDesc | List of files that make up the schema package. These are not regular file paths but glob patterns, meaning that - file trees can be defined in a consise way like `schemas/**/*.mabo`. + file trees can be defined in a concise way like `schemas/**/*.mabo`. Regardless of the [glob pattern](https://en.wikipedia.org/wiki/Glob_(programming)) defined the final file list is always filtered by the `.mabo` file extension.