Remove always-inline (#879)

This commit is contained in:
Charlie Marsh 2022-11-22 17:13:25 -05:00 committed by GitHub
parent 9315b9f459
commit 814ddeb7ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 11 deletions

View file

@ -6,7 +6,6 @@ use rustpython_ast::{Excepthandler, ExcepthandlerKind, Expr, ExprKind, Location,
use crate::ast::types::Range;
use crate::SourceCodeLocator;
#[inline(always)]
fn collect_call_path_inner<'a>(expr: &'a Expr, parts: &mut Vec<&'a str>) {
match &expr.node {
ExprKind::Call { func, .. } => {
@ -24,7 +23,7 @@ fn collect_call_path_inner<'a>(expr: &'a Expr, parts: &mut Vec<&'a str>) {
}
/// Convert an `Expr` to its call path (like `List`, or `typing.List`).
#[inline(always)]
pub fn compose_call_path(expr: &Expr) -> Option<String> {
let segments = collect_call_paths(expr);
if segments.is_empty() {
@ -35,7 +34,7 @@ pub fn compose_call_path(expr: &Expr) -> Option<String> {
}
/// Convert an `Expr` to its call path segments (like ["typing", "List"]).
#[inline(always)]
pub fn collect_call_paths(expr: &Expr) -> Vec<&str> {
let mut segments = vec![];
collect_call_path_inner(expr, &mut segments);