atuin-common 18.16.0

common library for atuin
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::sync::Once;

static INIT: Once = Once::new();

/// Ensure the rustls crypto provider (ring) is installed.
///
/// Must be called before creating any reqwest clients. Safe to call
/// multiple times — only the first call installs the provider.
pub fn ensure_crypto_provider() {
    INIT.call_once(|| {
        rustls::crypto::ring::default_provider()
            .install_default()
            .expect("Failed to install rustls crypto provider");
    });
}