Remove Span::unknown (#525)

This commit is contained in:
JT
2021-12-19 18:46:13 +11:00
committed by GitHub
parent b54e9b6bfd
commit 2883d6cd1e
183 changed files with 1291 additions and 1124 deletions

View File

@ -1,7 +1,7 @@
use crate::inc::SemVerAction;
use crate::Inc;
use nu_plugin::{EvaluatedCall, LabeledError, Plugin};
use nu_protocol::{Signature, Span, Value};
use nu_protocol::{Signature, Value};
impl Plugin for Inc {
fn signature(&self) -> Vec<Signature> {
@ -31,9 +31,7 @@ impl Plugin for Inc {
input: &Value,
) -> Result<Value, LabeledError> {
if name != "inc" {
return Ok(Value::Nothing {
span: Span::unknown(),
});
return Ok(Value::Nothing { span: call.head });
}
if call.has_flag("major") {