Skip to content

Commit 2dd0ce5

Browse files
authored
remove ellipsis() (RustPython#5973)
1 parent 1d36034 commit 2dd0ce5

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

vm/src/builtins/code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl ConstantBag for PyObjBag<'_> {
143143
ctx.new_tuple(elements).into()
144144
}
145145
bytecode::BorrowedConstant::None => ctx.none(),
146-
bytecode::BorrowedConstant::Ellipsis => ctx.ellipsis(),
146+
bytecode::BorrowedConstant::Ellipsis => ctx.ellipsis.clone().into(),
147147
};
148148
Literal(obj)
149149
}

vm/src/stdlib/ast/constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl Node for ConstantLiteral {
161161
.ctx
162162
.new_complex(num_complex::Complex::new(real, imag))
163163
.into_pyobject(vm),
164-
Self::Ellipsis => vm.ctx.ellipsis(),
164+
Self::Ellipsis => vm.ctx.ellipsis.clone().into(),
165165
}
166166
}
167167

vm/src/stdlib/marshal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ mod decl {
138138
}
139139

140140
fn make_ellipsis(&self) -> Self::Value {
141-
self.0.ctx.ellipsis()
141+
self.0.ctx.ellipsis.clone().into()
142142
}
143143

144144
fn make_float(&self, value: f64) -> Self::Value {

vm/src/vm/context.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,6 @@ impl Context {
363363
self.none.clone().into()
364364
}
365365

366-
#[inline(always)]
367-
pub fn ellipsis(&self) -> PyObjectRef {
368-
self.ellipsis.clone().into()
369-
}
370-
371366
#[inline(always)]
372367
pub fn not_implemented(&self) -> PyObjectRef {
373368
self.not_implemented.clone().into()

0 commit comments

Comments
 (0)