FuncArgs::is_empty()

This commit is contained in:
Jeong YunWon
2024-05-08 00:54:53 +09:00
committed by Jeong, YunWon
parent b4bae8173b
commit 2bf7a4a08c

View File

@@ -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)