try putting docs on netlify
This commit is contained in:
parent
6faae7718f
commit
d481392563
|
@ -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();
|
||||
|
||||
|
|
11
netlify.toml
11
netlify.toml
|
@ -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"
|
Loading…
Reference in New Issue