diff --git a/templates/core/Cargo.toml.example b/templates/core/Cargo.toml.example index 99adf847e..187b9ce45 100644 --- a/templates/core/Cargo.toml.example +++ b/templates/core/Cargo.toml.example @@ -1,5 +1,4 @@ -{# The example Cargo.toml used in about.html #} -[package] +{# The example Cargo.toml used in about.html #}[package] name = "test" [package.metadata.docs.rs] diff --git a/templates/core/about/builds.html b/templates/core/about/builds.html index 07c345c2b..43628605b 100644 --- a/templates/core/about/builds.html +++ b/templates/core/about/builds.html @@ -31,7 +31,7 @@

Setting a README

Detecting Docs.rs

To recognize Docs.rs from build.rs files, you can test for the environment variable DOCS_RS, e.g.: - {% filter dedent(levels=4) -%} + {% filter dedent(levels=3) -%}

if let Ok(_) = std::env::var("DOCS_RS") {
                 // ... your code here ...
             }