mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 01:27:52 +02:00
Add configurations for table headers (#1537)
* Add configurations for table headers * lint Co-authored-by: Amanita-Muscaria <nope>
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user