uniget_screenshots/
lib.rs1#![doc = include_str!("../README.md")]
2#![warn(
3 clippy::all,
4 clippy::pedantic,
5 rust_2018_idioms,
6 rustdoc::all,
7 rust_2024_compatibility,
8 missing_docs
9)]
10#![allow(clippy::module_name_repetitions)]
11
12#[deprecated(note = "If possible, v2 should be used instead")]
13pub mod v1;
14pub mod v2;
15
16pub use v2::*;
17
18macro_rules! database_url {
19 (v1 $url:literal) => {
20 pub const DATABASE_URL: &str = $url;
22 #[must_use]
23 pub fn database_url() -> url::Url {
25 unsafe { url::Url::parse(DATABASE_URL).unwrap_unchecked() }
26 }
27 };
28
29 (v2 $url:literal) => {
30 pub const DATABASE_URL: &str = $url;
32 #[must_use]
33 pub fn database_url() -> url::Url {
35 unsafe { url::Url::parse(DATABASE_URL).unwrap_unchecked() }
36 }
37 };
38}
39
40#[allow(hidden_glob_reexports)]
42pub(crate) use database_url;