Skip to content

Commit f6d1914

Browse files
committed
fix: Clarify ColumnSeparator is Padding
1 parent 4c113cc commit f6d1914

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ pub fn normalize_untrusted_str(s: &str) -> String {
5757
pub use level::Level;
5858
#[doc(inline)]
5959
pub use renderer::Renderer;
60-
pub use snippet::ColumnSeparator;
60+
pub use snippet::Padding;
6161
pub use snippet::*;

src/renderer/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl Renderer {
383383
self.render_origin(buffer, max_line_num_len, origin);
384384
last_was_suggestion = false;
385385
}
386-
Element::ColumnSeparator(_) => {
386+
Element::Padding(_) => {
387387
self.draw_col_separator_no_space(
388388
buffer,
389389
buffer.num_lines(),
@@ -430,7 +430,7 @@ impl Renderer {
430430

431431
let (has_primary_spans, has_span_labels) =
432432
next_section.map_or((false, false), |s| match s {
433-
Element::Title(_) | Element::ColumnSeparator(_) => (false, false),
433+
Element::Title(_) | Element::Padding(_) => (false, false),
434434
Element::Cause(cause) => (
435435
cause.markers.iter().any(|m| m.kind.is_primary()),
436436
cause.markers.iter().any(|m| m.label.is_some()),

src/snippet.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl<'a> Message<'a> {
3434
v.elements
3535
.iter()
3636
.map(|s| match s {
37-
Element::Title(_) | Element::Origin(_) | Element::ColumnSeparator(_) => 0,
37+
Element::Title(_) | Element::Origin(_) | Element::Padding(_) => 0,
3838
Element::Cause(cause) => {
3939
let end = cause
4040
.markers
@@ -104,7 +104,7 @@ pub enum Element<'a> {
104104
Cause(Snippet<'a, Annotation<'a>>),
105105
Suggestion(Snippet<'a, Patch<'a>>),
106106
Origin(Origin<'a>),
107-
ColumnSeparator(ColumnSeparator),
107+
Padding(Padding),
108108
}
109109

110110
impl<'a> From<Title<'a>> for Element<'a> {
@@ -131,14 +131,14 @@ impl<'a> From<Origin<'a>> for Element<'a> {
131131
}
132132
}
133133

134-
impl From<ColumnSeparator> for Element<'_> {
135-
fn from(value: ColumnSeparator) -> Self {
136-
Self::ColumnSeparator(value)
134+
impl From<Padding> for Element<'_> {
135+
fn from(value: Padding) -> Self {
136+
Self::Padding(value)
137137
}
138138
}
139139

140140
#[derive(Debug)]
141-
pub struct ColumnSeparator;
141+
pub struct Padding;
142142

143143
#[derive(Debug)]
144144
pub struct Title<'a> {

0 commit comments

Comments
 (0)