inspector: Fix Rust parser of inspector. (#1209)

This PR aims to fix a bug of the Rust parser in my last PR #1205.
This commit is contained in:
Chuqiao Feng 2025-09-05 15:08:05 +08:00 committed by GitHub
parent 8992852165
commit c6f6a9bb09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -365,8 +365,8 @@ fn rust_to_style(
let mut err = String::new();
let methods = rust_code[begin..]
.split(&['.', '(', ')', '{', '}'])
.filter(|s| !s.is_empty())
.map(str::trim);
.map(str::trim)
.filter(|s| !s.is_empty());
let style_methods = StyleMethods::get();
for method in methods {
match style_methods.map.get(method) {