Add configurations for table headers (#1537)

* Add configurations for table headers

* lint

Co-authored-by: Amanita-Muscaria <nope>
This commit is contained in:
Corvus Corax
2020-03-30 18:19:48 -05:00
committed by GitHub
parent 6e71c1008d
commit a4c1b092ba
2 changed files with 87 additions and 6 deletions

View File

@ -74,6 +74,16 @@ impl Primitive {
)),
}
}
pub fn into_string(self, span: Span) -> Result<String, ShellError> {
match self {
Primitive::String(s) => Ok(s),
other => Err(ShellError::type_error(
"string",
other.type_name().spanned(span),
)),
}
}
}
impl num_traits::Zero for Primitive {