We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12b961f commit 6ba7655Copy full SHA for 6ba7655
vm/src/obj/objrange.rs
@@ -381,10 +381,9 @@ impl PyRange {
381
.into_object())
382
}
383
RangeIndex::Int(index) => {
384
- if let Some(value) = self.get(index.as_bigint()) {
385
- Ok(PyInt::new(value).into_ref(vm).into_object())
386
- } else {
387
- Err(vm.new_index_error("range object index out of range".to_string()))
+ match self.get(index.as_bigint()) {
+ Some(value) => Ok(PyInt::new(value).into_ref(vm).into_object()),
+ None => Err(vm.new_index_error("range object index out of range".to_string()))
388
389
390
0 commit comments