forked from Rust-related/RustPython
FuncArgs::is_empty()
This commit is contained in:
committed by
Jeong, YunWon
parent
b4bae8173b
commit
2bf7a4a08c
@@ -130,6 +130,10 @@ impl FuncArgs {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.args.is_empty() && self.kwargs.is_empty()
|
||||
}
|
||||
|
||||
pub fn prepend_arg(&mut self, item: PyObjectRef) {
|
||||
self.args.reserve_exact(1);
|
||||
self.args.insert(0, item)
|
||||
|
||||
Reference in New Issue
Block a user