Positive case of len() -> is_empty()
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
This commit is contained in:
@@ -130,7 +130,7 @@ r##"<!DOCTYPE html>
|
||||
content = *t,
|
||||
root_path = page.root_path,
|
||||
ty = page.ty,
|
||||
logo = if layout.logo.len() == 0 {
|
||||
logo = if layout.logo.is_empty() {
|
||||
"".to_string()
|
||||
} else {
|
||||
format!("<a href='{}{}/index.html'>\
|
||||
@@ -141,7 +141,7 @@ r##"<!DOCTYPE html>
|
||||
title = page.title,
|
||||
description = page.description,
|
||||
keywords = page.keywords,
|
||||
favicon = if layout.favicon.len() == 0 {
|
||||
favicon = if layout.favicon.is_empty() {
|
||||
"".to_string()
|
||||
} else {
|
||||
format!(r#"<link rel="shortcut icon" href="{}">"#, layout.favicon)
|
||||
@@ -152,7 +152,7 @@ r##"<!DOCTYPE html>
|
||||
sidebar = *sidebar,
|
||||
krate = layout.krate,
|
||||
play_url = layout.playground_url,
|
||||
play_js = if layout.playground_url.len() == 0 {
|
||||
play_js = if layout.playground_url.is_empty() {
|
||||
"".to_string()
|
||||
} else {
|
||||
format!(r#"<script src="{}playpen.js"></script>"#, page.root_path)
|
||||
|
||||
Reference in New Issue
Block a user