Positive case of len() -> is_empty()

`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
This commit is contained in:
Tamir Duberstein
2015-03-24 16:53:34 -07:00
parent 16e1fcead1
commit 29ac04402d
67 changed files with 117 additions and 117 deletions

View File

@@ -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)