try putting docs on netlify
This commit is contained in:
parent
6faae7718f
commit
d481392563
|
@ -10,9 +10,6 @@ use metrics::{
|
||||||
Key, Recorder, Unit,
|
Key, Recorder, Unit,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
static RECORDER: PrintRecorder = PrintRecorder;
|
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
struct PrintRecorder;
|
struct PrintRecorder;
|
||||||
|
|
||||||
|
@ -51,17 +48,11 @@ impl Recorder for PrintRecorder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
|
||||||
fn init_print_logger() {
|
fn init_print_logger() {
|
||||||
let recorder = PrintRecorder::default();
|
let recorder = PrintRecorder::default();
|
||||||
metrics::set_boxed_recorder(Box::new(recorder)).unwrap()
|
metrics::set_boxed_recorder(Box::new(recorder)).unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "std"))]
|
|
||||||
fn init_print_logger() {
|
|
||||||
metrics::set_recorder(&RECORDER).unwrap()
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let server_name = "web03".to_string();
|
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]]
|
[[redirects]]
|
||||||
from = "/"
|
from = "/"
|
||||||
to = "https://docs.rs/metrics"
|
to = "/metrics"
|
||||||
status = 302
|
|
Loading…
Reference in New Issue