From bba1d531c87a41cdcffe721629a65a0c9b9a8d47 Mon Sep 17 00:00:00 2001 From: Paul Gey Date: Tue, 13 Aug 2024 20:29:58 +0200 Subject: [PATCH] fix some typos in the docs --- src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 91e3018..504ca16 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -234,7 +234,7 @@ pub enum ReportKind<'a> { /// The report is a warning and indicates a likely problem, but not to the extent that the requested action cannot /// be performed. Warning, - /// The report is advice to the user about a potential anti-pattern of other benign issues. + /// The report is advice to the user about a potential anti-pattern or other benign issues. Advice, /// The report is of a kind not built into Ariadne. Custom(&'a str, Color), @@ -386,9 +386,9 @@ pub enum CharSet { /// Possible character sets to use when rendering diagnostics. #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum IndexType { - /// Byte spans. Always results in O(1) loopups + /// Byte spans. Always results in O(1) lookups. Byte, - /// Char based spans. May incur O(n) lookups + /// Char based spans. May incur O(n) lookups. Char, } @@ -411,7 +411,7 @@ impl Config { /// /// The alternative to this is to insert crossing characters. However, these interact poorly with label colours. /// - /// If unspecified, this defaults to [`false`]. + /// If unspecified, this defaults to [`true`]. pub const fn with_cross_gap(mut self, cross_gap: bool) -> Self { self.cross_gap = cross_gap; self @@ -467,7 +467,7 @@ impl Config { } /// Should this report use byte spans instead of char spans? /// - /// If unspecified, this defaults to 'false' + /// If unspecified, this defaults to [`IndexType::Char`]. pub const fn with_index_type(mut self, index_type: IndexType) -> Self { self.index_type = index_type; self