/
germanubis
/
criterion.rs
Обзор
Документация
Войти
/
germanubis
/
criterion.rs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
plot/src/proxy.rs
47 строк
991 B
Samuel Tardieu
Various cleanups (#770)
01 апр 2024, 18:50
Не верифицирован
01 апр 2024, 18:50
f1ea31a
Код
Авторство
О чём код?
//! Generic constructors for newtypes #![allow(non_snake_case)] use crate::{Font as FontType, Label as LabelType, Output as OutputType, Title as TitleType}; use std::borrow::Cow; use std::path::Path; /// Generic constructor for `Font` #[allow(clippy::inline_always)] #[inline(always)] pub fn Font<S>(string: S) -> FontType where S: Into<Cow<'static, str>>, { FontType(string.into()) } /// Generic constructor for `Label` #[allow(clippy::inline_always)] #[inline(always)] pub fn Label<S>(string: S) -> LabelType where S: Into<Cow<'static, str>>, { LabelType(string.into()) } /// Generic constructor for `Title` #[allow(clippy::inline_always)] #[inline(always)] pub fn Title<S>(string: S) -> TitleType where S: Into<Cow<'static, str>>, { TitleType(string.into()) } /// Generic constructor for `Output` #[allow(clippy::inline_always)] #[inline(always)] pub fn Output<P>(path: P) -> OutputType where P: Into<Cow<'static, Path>>, { OutputType(path.into()) }