From e4a6956e5ac89b8752e05b922050f287c73c44f8 Mon Sep 17 00:00:00 2001 From: bluss Date: Tue, 1 Nov 2016 02:13:35 +0100 Subject: [PATCH 1/2] Add doc(html_root_url) and other doc attrs to each crate Also update to use https instead of http. This avois mixed content degradation on docs.rs. The doc root URLs are correct as they are, the URL does not include the crate name itself. --- bigint/src/lib.rs | 4 ++++ complex/src/lib.rs | 4 ++++ integer/src/lib.rs | 4 ++++ iter/src/lib.rs | 4 ++++ macros/src/lib.rs | 4 ++++ rational/src/lib.rs | 4 ++++ src/lib.rs | 8 ++++---- traits/src/lib.rs | 4 ++++ 8 files changed, 32 insertions(+), 4 deletions(-) diff --git a/bigint/src/lib.rs b/bigint/src/lib.rs index ed0f442..9e6119b 100644 --- a/bigint/src/lib.rs +++ b/bigint/src/lib.rs @@ -69,6 +69,10 @@ //! # fn main() { //! # } //! ``` +#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://rust-num.github.io/num/favicon.ico", + html_root_url = "https://rust-num.github.io/num/", + html_playground_url = "https://play.rust-lang.org/")] #[cfg(any(feature = "rand", test))] extern crate rand; diff --git a/complex/src/lib.rs b/complex/src/lib.rs index 9b11318..a232a84 100644 --- a/complex/src/lib.rs +++ b/complex/src/lib.rs @@ -9,6 +9,10 @@ // except according to those terms. //! Complex numbers. +#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://rust-num.github.io/num/favicon.ico", + html_root_url = "https://rust-num.github.io/num/", + html_playground_url = "https://play.rust-lang.org/")] extern crate num_traits as traits; diff --git a/integer/src/lib.rs b/integer/src/lib.rs index 9c7e8aa..314f2b5 100644 --- a/integer/src/lib.rs +++ b/integer/src/lib.rs @@ -9,6 +9,10 @@ // except according to those terms. //! Integer trait and functions. +#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://rust-num.github.io/num/favicon.ico", + html_root_url = "https://rust-num.github.io/num/", + html_playground_url = "https://play.rust-lang.org/")] extern crate num_traits as traits; diff --git a/iter/src/lib.rs b/iter/src/lib.rs index 76fafbd..ace7bfe 100644 --- a/iter/src/lib.rs +++ b/iter/src/lib.rs @@ -9,6 +9,10 @@ // except according to those terms. //! External iterators for generic mathematics +#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://rust-num.github.io/num/favicon.ico", + html_root_url = "https://rust-num.github.io/num/", + html_playground_url = "https://play.rust-lang.org/")] extern crate num_traits as traits; extern crate num_integer as integer; diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 2d5c67f..fc5a946 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -9,6 +9,10 @@ // except according to those terms. #![feature(plugin_registrar, rustc_private)] +#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://rust-num.github.io/num/favicon.ico", + html_root_url = "https://rust-num.github.io/num/", + html_playground_url = "https://play.rust-lang.org/")] extern crate syntax; extern crate syntax_ext; diff --git a/rational/src/lib.rs b/rational/src/lib.rs index dec7400..52e7147 100644 --- a/rational/src/lib.rs +++ b/rational/src/lib.rs @@ -9,6 +9,10 @@ // except according to those terms. //! Rational numbers +#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://rust-num.github.io/num/favicon.ico", + html_root_url = "https://rust-num.github.io/num/", + html_playground_url = "https://play.rust-lang.org/")] #[cfg(feature = "rustc-serialize")] extern crate rustc_serialize; diff --git a/src/lib.rs b/src/lib.rs index d6eff30..a5d2f30 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -52,10 +52,10 @@ //! ``` //! //! [newt]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method -#![doc(html_logo_url = "http://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://rust-num.github.io/num/favicon.ico", - html_root_url = "http://rust-num.github.io/num/", - html_playground_url = "http://play.rust-lang.org/")] +#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://rust-num.github.io/num/favicon.ico", + html_root_url = "https://rust-num.github.io/num/", + html_playground_url = "https://play.rust-lang.org/")] extern crate num_traits; extern crate num_integer; diff --git a/traits/src/lib.rs b/traits/src/lib.rs index cc79d30..8663bda 100644 --- a/traits/src/lib.rs +++ b/traits/src/lib.rs @@ -9,6 +9,10 @@ // except according to those terms. //! Numeric traits for generic mathematics +#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://rust-num.github.io/num/favicon.ico", + html_root_url = "https://rust-num.github.io/num/", + html_playground_url = "https://play.rust-lang.org/")] use std::ops::{Add, Sub, Mul, Div, Rem}; From ff2a350e98f0bbe4b8076336933eb6a4b9c889bd Mon Sep 17 00:00:00 2001 From: bluss Date: Wed, 2 Nov 2016 19:51:10 +0100 Subject: [PATCH 2/2] Use the integer32 playground --- bigint/src/lib.rs | 2 +- complex/src/lib.rs | 2 +- integer/src/lib.rs | 2 +- iter/src/lib.rs | 2 +- macros/src/lib.rs | 2 +- rational/src/lib.rs | 2 +- src/lib.rs | 2 +- traits/src/lib.rs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bigint/src/lib.rs b/bigint/src/lib.rs index 9e6119b..5d261da 100644 --- a/bigint/src/lib.rs +++ b/bigint/src/lib.rs @@ -72,7 +72,7 @@ #![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://rust-num.github.io/num/favicon.ico", html_root_url = "https://rust-num.github.io/num/", - html_playground_url = "https://play.rust-lang.org/")] + html_playground_url = "http://play.integer32.com/")] #[cfg(any(feature = "rand", test))] extern crate rand; diff --git a/complex/src/lib.rs b/complex/src/lib.rs index a232a84..8a3718f 100644 --- a/complex/src/lib.rs +++ b/complex/src/lib.rs @@ -12,7 +12,7 @@ #![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://rust-num.github.io/num/favicon.ico", html_root_url = "https://rust-num.github.io/num/", - html_playground_url = "https://play.rust-lang.org/")] + html_playground_url = "http://play.integer32.com/")] extern crate num_traits as traits; diff --git a/integer/src/lib.rs b/integer/src/lib.rs index 314f2b5..00cc3ba 100644 --- a/integer/src/lib.rs +++ b/integer/src/lib.rs @@ -12,7 +12,7 @@ #![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://rust-num.github.io/num/favicon.ico", html_root_url = "https://rust-num.github.io/num/", - html_playground_url = "https://play.rust-lang.org/")] + html_playground_url = "http://play.integer32.com/")] extern crate num_traits as traits; diff --git a/iter/src/lib.rs b/iter/src/lib.rs index ace7bfe..68323ef 100644 --- a/iter/src/lib.rs +++ b/iter/src/lib.rs @@ -12,7 +12,7 @@ #![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://rust-num.github.io/num/favicon.ico", html_root_url = "https://rust-num.github.io/num/", - html_playground_url = "https://play.rust-lang.org/")] + html_playground_url = "http://play.integer32.com/")] extern crate num_traits as traits; extern crate num_integer as integer; diff --git a/macros/src/lib.rs b/macros/src/lib.rs index fc5a946..3bea3e6 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -12,7 +12,7 @@ #![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://rust-num.github.io/num/favicon.ico", html_root_url = "https://rust-num.github.io/num/", - html_playground_url = "https://play.rust-lang.org/")] + html_playground_url = "http://play.integer32.com/")] extern crate syntax; extern crate syntax_ext; diff --git a/rational/src/lib.rs b/rational/src/lib.rs index 52e7147..938de46 100644 --- a/rational/src/lib.rs +++ b/rational/src/lib.rs @@ -12,7 +12,7 @@ #![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://rust-num.github.io/num/favicon.ico", html_root_url = "https://rust-num.github.io/num/", - html_playground_url = "https://play.rust-lang.org/")] + html_playground_url = "http://play.integer32.com/")] #[cfg(feature = "rustc-serialize")] extern crate rustc_serialize; diff --git a/src/lib.rs b/src/lib.rs index a5d2f30..77b34c3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -55,7 +55,7 @@ #![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://rust-num.github.io/num/favicon.ico", html_root_url = "https://rust-num.github.io/num/", - html_playground_url = "https://play.rust-lang.org/")] + html_playground_url = "http://play.integer32.com/")] extern crate num_traits; extern crate num_integer; diff --git a/traits/src/lib.rs b/traits/src/lib.rs index 8663bda..2cd85d4 100644 --- a/traits/src/lib.rs +++ b/traits/src/lib.rs @@ -12,7 +12,7 @@ #![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://rust-num.github.io/num/favicon.ico", html_root_url = "https://rust-num.github.io/num/", - html_playground_url = "https://play.rust-lang.org/")] + html_playground_url = "http://play.integer32.com/")] use std::ops::{Add, Sub, Mul, Div, Rem};