mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 05:03:46 +08:00
Stop boxing ParseExecutionContext
This wasn't necessary - probably a holdover from using unique_ptr in C++.
This commit is contained in:
parent
89376d5fd0
commit
f0eaa516c0
|
@ -101,7 +101,7 @@ struct CachedLineno {
|
|||
}
|
||||
|
||||
impl ParseExecutionContext {
|
||||
pub fn swap(left: &Self, right: Box<Self>) -> Box<Self> {
|
||||
pub fn swap(left: &Self, right: Self) -> Self {
|
||||
left.pstree.swap(&right.pstree);
|
||||
left.cancel_signal.swap(&right.cancel_signal);
|
||||
left.executing_job_node.swap(&right.executing_job_node);
|
||||
|
|
|
@ -308,7 +308,7 @@ pub struct Parser {
|
|||
base: SharedFromThisBase<Parser>,
|
||||
|
||||
/// The current execution context.
|
||||
execution_context: RefCell<Option<Box<ParseExecutionContext>>>,
|
||||
execution_context: RefCell<Option<ParseExecutionContext>>,
|
||||
|
||||
/// The jobs associated with this parser.
|
||||
job_list: RefCell<JobList>,
|
||||
|
@ -381,7 +381,7 @@ impl Parser {
|
|||
result
|
||||
}
|
||||
|
||||
fn execution_context(&self) -> Ref<'_, Option<Box<ParseExecutionContext>>> {
|
||||
fn execution_context(&self) -> Ref<'_, Option<ParseExecutionContext>> {
|
||||
self.execution_context.borrow()
|
||||
}
|
||||
|
||||
|
@ -579,10 +579,7 @@ impl Parser {
|
|||
))
|
||||
}
|
||||
},
|
||||
Some(Box::new(ParseExecutionContext::new(
|
||||
ps.clone(),
|
||||
block_io.clone(),
|
||||
))),
|
||||
Some(ParseExecutionContext::new(ps.clone(), block_io.clone())),
|
||||
);
|
||||
|
||||
// Check the exec count so we know if anything got executed.
|
||||
|
|
Loading…
Reference in New Issue
Block a user