remove 'as_str' when it's already a str type.
remove 'as_str' when it's already a str type.

fix #62642

graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust