forked from extern/nushell
Replace &Span
with Span
since Span
is Copy
(#9770)
# Description `Span` is `Copy`, so we probably should not be passing references of `Span` around. This PR replaces all instances of `&Span` with `Span`, copying spans where necessary. # User-Facing Changes This alters some public functions to take `Span` instead of `&Span` as input. Namely, `EngineState::get_span_contents`, `nu_protocol::extract_value`, a bunch of the math commands, and `Gstat::gstat`.
This commit is contained in:
@ -71,7 +71,7 @@ This command is a parser keyword. For details, check:
|
||||
|
||||
// See if the module is a file
|
||||
let module_arg_str = String::from_utf8_lossy(
|
||||
engine_state.get_span_contents(&import_pattern.head.span),
|
||||
engine_state.get_span_contents(import_pattern.head.span),
|
||||
);
|
||||
|
||||
let maybe_file_path = find_in_dirs_env(
|
||||
|
Reference in New Issue
Block a user