Add space between column suggestions (#2586)

This commit is contained in:
Chris Gillespie 2020-09-21 19:14:11 -07:00 committed by GitHub
parent 09429d08aa
commit b133724b38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 5 deletions

View File

@ -190,7 +190,7 @@ pub fn get_column_path_from_table_error(
.map(|x| x.to_owned())
.collect::<Vec<String>>()
.join(","),
names.join(",")
names.join(", ")
),
column_path_tried.span.since(path_members_span),
)
@ -240,7 +240,7 @@ pub fn get_column_from_row_error(
format!(
"Perhaps you meant '{}'? Columns available: {}",
suggestions[0].1,
&obj_source.data_descriptors().join(",")
&obj_source.data_descriptors().join(", ")
),
column_path_tried.span.since(path_members_span),
))
@ -257,7 +257,7 @@ pub fn get_column_from_row_error(
column_path_tried.span,
format!(
"Appears to contain columns. Columns available: {}",
columns.keys().join(",")
columns.keys().join(", ")
),
column_path_tried.span.since(path_members_span),
)),

View File

@ -143,6 +143,8 @@ fn errors_fetching_by_column_not_present() {
r#"
[taconushell]
sentence_words = ["Yo", "quiero", "taconushell"]
[pizzanushell]
sentence-words = ["I", "want", "pizza"]
"#,
)]);
@ -165,7 +167,13 @@ fn errors_fetching_by_column_not_present() {
assert!(
actual.err.contains("Perhaps you meant 'taconushell'?"),
format!("actual: {:?}", actual.err)
)
);
assert!(
actual
.err
.contains("Columns available: pizzanushell, taconushell"),
format!("actual: {:?}", actual.err)
);
})
}

View File

@ -273,7 +273,7 @@ where
.map(|x| x.to_owned())
.collect::<Vec<String>>()
.join(","),
names.join(",")
names.join(", ")
),
column_path_tried.span.since(path_members_span),
);