try putting docs on netlify

This commit is contained in:
Toby Lawrence 2020-10-28 20:59:03 -04:00
parent 6faae7718f
commit d481392563
2 changed files with 9 additions and 11 deletions

View File

@ -10,9 +10,6 @@ use metrics::{
Key, Recorder, Unit,
};
#[allow(dead_code)]
static RECORDER: PrintRecorder = PrintRecorder;
#[derive(Default)]
struct PrintRecorder;
@ -51,17 +48,11 @@ impl Recorder for PrintRecorder {
}
}
#[cfg(feature = "std")]
fn init_print_logger() {
let recorder = PrintRecorder::default();
metrics::set_boxed_recorder(Box::new(recorder)).unwrap()
}
#[cfg(not(feature = "std"))]
fn init_print_logger() {
metrics::set_recorder(&RECORDER).unwrap()
}
fn main() {
let server_name = "web03".to_string();

View File

@ -1,4 +1,11 @@
[build]
command = """
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly --profile minimal \
&& source $HOME/.cargo/env \
&& RUSTDOCFLAGS=\"--cfg docsrs\" cargo +nightly doc --no-deps
"""
publish = "target/doc"
[[redirects]]
from = "/"
to = "https://docs.rs/metrics"
status = 302
to = "/metrics"