mirror of
https://github.com/nushell/nushell.git
synced 2025-01-11 08:48:23 +01:00
Do not set visibility to true automatically (#4591)
Adding it by default grows the size of the visibility structure a lot.
This commit is contained in:
parent
359bb6eebe
commit
739e403cd5
@ -328,6 +328,7 @@ pub fn parse_def(
|
||||
let block = call.positional.get(2).expect("def call already checked");
|
||||
|
||||
let mut error = None;
|
||||
|
||||
if let (Some(name), Some(mut signature), Some(block_id)) =
|
||||
(&name_expr.as_string(), sig.as_signature(), block.as_block())
|
||||
{
|
||||
|
@ -743,7 +743,6 @@ impl<'a> StateWorkingSet<'a> {
|
||||
.expect("internal error: missing required scope frame");
|
||||
|
||||
scope_frame.decls.insert(name, decl_id);
|
||||
scope_frame.visibility.use_decl_id(&decl_id);
|
||||
|
||||
decl_id
|
||||
}
|
||||
@ -790,7 +789,6 @@ impl<'a> StateWorkingSet<'a> {
|
||||
|
||||
if let Some(decl_id) = scope_frame.predecls.remove(name) {
|
||||
scope_frame.decls.insert(name.into(), decl_id);
|
||||
scope_frame.visibility.use_decl_id(&decl_id);
|
||||
|
||||
return Some(decl_id);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user