summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authorMargaret Matocha <ksmatocha@gmail.com>2020-07-28 14:53:50 -0500
committerMargaret Matocha <ksmatocha@gmail.com>2020-07-28 14:53:50 -0500
commit076c5f946f1239a593ae8a51d4d8648ef6620406 (patch)
tree03b56f6108a93590a68347393db25d27e92c6567 /shared-bindings
parentfd7801415aae3342bbb0b0f6f88fe28a5e093afe (diff)
Updated to remove unnecessary else statement
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/displayio/Group.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/shared-bindings/displayio/Group.c b/shared-bindings/displayio/Group.c
index 5c6f25dba..f50145324 100644
--- a/shared-bindings/displayio/Group.c
+++ b/shared-bindings/displayio/Group.c
@@ -218,11 +218,11 @@ STATIC mp_obj_t displayio_group_obj_insert(mp_obj_t self_in, mp_obj_t index_obj,
if ((size_t) MP_OBJ_SMALL_INT_VALUE(index_obj) == common_hal_displayio_group_get_len(self)){
return displayio_group_obj_append(self_in, layer);
}
- else {
- size_t index = mp_get_index(&displayio_group_type, common_hal_displayio_group_get_len(self), index_obj, false);
- common_hal_displayio_group_insert(self, index, layer);
- return mp_const_none;
- }
+
+ size_t index = mp_get_index(&displayio_group_type, common_hal_displayio_group_get_len(self), index_obj, false);
+ common_hal_displayio_group_insert(self, index, layer);
+ return mp_const_none;
+
}
MP_DEFINE_CONST_FUN_OBJ_3(displayio_group_insert_obj, displayio_group_obj_insert);