Skip to content

Commit

Permalink
chore: Remove unnecessary returns
Browse files Browse the repository at this point in the history
  • Loading branch information
kjarosh committed Jun 27, 2024
1 parent 86d520c commit c7a2009
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/avm2/globals/flash/text/text_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,11 +1164,11 @@ pub fn get_line_length<'gc>(
return Err(make_error_2006(activation));
}

return if let Some(length) = this.line_length(line_num as usize) {
if let Some(length) = this.line_length(line_num as usize) {
Ok(length.into())
} else {
Err(make_error_2006(activation))
};
}
}

pub fn get_line_text<'gc>(
Expand Down Expand Up @@ -1208,11 +1208,11 @@ pub fn get_line_offset<'gc>(
return Err(make_error_2006(activation));
}

return if let Some(offset) = this.line_offset(line_num as usize) {
if let Some(offset) = this.line_offset(line_num as usize) {
Ok(offset.into())
} else {
Err(make_error_2006(activation))
};
}
}

pub fn get_bottom_scroll_v<'gc>(
Expand Down

0 comments on commit c7a2009

Please sign in to comment.