Use as_str() instead of to_string()

This commit is contained in:
Adrian Kumpf
2026-02-25 14:45:58 +01:00
parent dac1cf25c1
commit ae7d477d54
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ const TOKEN_URL_CN: &str = "https://auth.tesla.cn/oauth2/v3/token";
const REDIRECT_URL: &str = "https://auth.tesla.com/void/callback";
pub fn is_redirect_url(url: &Url) -> bool {
url.to_string().starts_with(REDIRECT_URL)
url.as_str().starts_with(REDIRECT_URL)
}
#[derive(Debug, Clone)]
+1 -1
View File
@@ -163,7 +163,7 @@ fn main() -> anyhow::Result<()> {
} => *control_flow = ControlFlow::Exit,
Event::UserEvent(UserEvent::Navigation(url)) => {
if url.to_string() != "about:blank" {
if url.as_str() != "about:blank" {
log::debug!("URL changed: {url}");
let _ = tx.send(url);
}