/rust/registry/src/index.crates.io-6f17d22bba15001f/criterion-plot-0.5.0/src/proxy.rs
Line | Count | Source (jump to first uncovered line) |
1 | | //! Generic constructors for newtypes |
2 | | |
3 | | #![allow(non_snake_case)] |
4 | | |
5 | | use crate::{Font as FontType, Label as LabelType, Output as OutputType, Title as TitleType}; |
6 | | use std::borrow::Cow; |
7 | | use std::path::Path; |
8 | | |
9 | | /// Generic constructor for `Font` |
10 | | #[cfg_attr(feature = "cargo-clippy", allow(clippy::inline_always))] |
11 | | #[inline(always)] |
12 | 0 | pub fn Font<S>(string: S) -> FontType |
13 | 0 | where |
14 | 0 | S: Into<Cow<'static, str>>, |
15 | 0 | { |
16 | 0 | FontType(string.into()) |
17 | 0 | } Unexecuted instantiation: criterion_plot::proxy::Font::<&str> Unexecuted instantiation: criterion_plot::proxy::Font::<_> |
18 | | |
19 | | /// Generic constructor for `Label` |
20 | | #[cfg_attr(feature = "cargo-clippy", allow(clippy::inline_always))] |
21 | | #[inline(always)] |
22 | 0 | pub fn Label<S>(string: S) -> LabelType |
23 | 0 | where |
24 | 0 | S: Into<Cow<'static, str>>, |
25 | 0 | { |
26 | 0 | LabelType(string.into()) |
27 | 0 | } Unexecuted instantiation: criterion_plot::proxy::Label::<alloc::string::String> Unexecuted instantiation: criterion_plot::proxy::Label::<&str> Unexecuted instantiation: criterion_plot::proxy::Label::<_> |
28 | | |
29 | | /// Generic constructor for `Title` |
30 | | #[cfg_attr(feature = "cargo-clippy", allow(clippy::inline_always))] |
31 | | #[inline(always)] |
32 | 0 | pub fn Title<S>(string: S) -> TitleType |
33 | 0 | where |
34 | 0 | S: Into<Cow<'static, str>>, |
35 | 0 | { |
36 | 0 | TitleType(string.into()) |
37 | 0 | } Unexecuted instantiation: criterion_plot::proxy::Title::<alloc::string::String> Unexecuted instantiation: criterion_plot::proxy::Title::<_> |
38 | | |
39 | | /// Generic constructor for `Output` |
40 | | #[cfg_attr(feature = "cargo-clippy", allow(clippy::inline_always))] |
41 | | #[inline(always)] |
42 | 0 | pub fn Output<P>(path: P) -> OutputType |
43 | 0 | where |
44 | 0 | P: Into<Cow<'static, Path>>, |
45 | 0 | { |
46 | 0 | OutputType(path.into()) |
47 | 0 | } Unexecuted instantiation: criterion_plot::proxy::Output::<std::path::PathBuf> Unexecuted instantiation: criterion_plot::proxy::Output::<_> |