Sha256: b35cd4e7fcc9a6fa2496d163d716155ddd379e027ef9516c1af05ce0cf605ae1

Contents?: true

Size: 1.51 KB

Versions: 23

Compression:

Stored size: 1.51 KB

Contents

#![allow(dead_code)]

use semver::{BuildMetadata, Comparator, Error, Prerelease, Version, VersionReq};
use std::fmt::Display;

#[cfg_attr(not(no_track_caller), track_caller)]
pub(super) fn version(text: &str) -> Version {
    Version::parse(text).unwrap()
}

#[cfg_attr(not(no_track_caller), track_caller)]
pub(super) fn version_err(text: &str) -> Error {
    Version::parse(text).unwrap_err()
}

#[cfg_attr(not(no_track_caller), track_caller)]
pub(super) fn req(text: &str) -> VersionReq {
    VersionReq::parse(text).unwrap()
}

#[cfg_attr(not(no_track_caller), track_caller)]
pub(super) fn req_err(text: &str) -> Error {
    VersionReq::parse(text).unwrap_err()
}

#[cfg_attr(not(no_track_caller), track_caller)]
pub(super) fn comparator(text: &str) -> Comparator {
    Comparator::parse(text).unwrap()
}

#[cfg_attr(not(no_track_caller), track_caller)]
pub(super) fn comparator_err(text: &str) -> Error {
    Comparator::parse(text).unwrap_err()
}

#[cfg_attr(not(no_track_caller), track_caller)]
pub(super) fn prerelease(text: &str) -> Prerelease {
    Prerelease::new(text).unwrap()
}

#[cfg_attr(not(no_track_caller), track_caller)]
pub(super) fn prerelease_err(text: &str) -> Error {
    Prerelease::new(text).unwrap_err()
}

#[cfg_attr(not(no_track_caller), track_caller)]
pub(super) fn build_metadata(text: &str) -> BuildMetadata {
    BuildMetadata::new(text).unwrap()
}

#[cfg_attr(not(no_track_caller), track_caller)]
pub(super) fn assert_to_string(value: impl Display, expected: &str) {
    assert_eq!(value.to_string(), expected);
}

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/semver-1.0.25/tests/util/mod.rs
wasmtime-28.0.0 ./ext/cargo-vendor/semver-1.0.24/tests/util/mod.rs
wasmtime-27.0.0 ./ext/cargo-vendor/semver-1.0.23/tests/util/mod.rs
wasmtime-26.0.0 ./ext/cargo-vendor/semver-1.0.23/tests/util/mod.rs
wasmtime-25.0.2 ./ext/cargo-vendor/semver-1.0.23/tests/util/mod.rs
wasmtime-25.0.1 ./ext/cargo-vendor/semver-1.0.23/tests/util/mod.rs
wasmtime-25.0.0 ./ext/cargo-vendor/semver-1.0.23/tests/util/mod.rs
wasmtime-24.0.0 ./ext/cargo-vendor/semver-1.0.23/tests/util/mod.rs
wasmtime-23.0.2 ./ext/cargo-vendor/semver-1.0.21/tests/util/mod.rs
wasmtime-22.0.0 ./ext/cargo-vendor/semver-1.0.21/tests/util/mod.rs
wasmtime-21.0.1 ./ext/cargo-vendor/semver-1.0.21/tests/util/mod.rs
wasmtime-20.0.2 ./ext/cargo-vendor/semver-1.0.21/tests/util/mod.rs
wasmtime-20.0.0 ./ext/cargo-vendor/semver-1.0.21/tests/util/mod.rs
wasmtime-18.0.3 ./ext/cargo-vendor/semver-1.0.21/tests/util/mod.rs
wasmtime-17.0.1 ./ext/cargo-vendor/semver-1.0.21/tests/util/mod.rs
wasmtime-17.0.0 ./ext/cargo-vendor/semver-1.0.21/tests/util/mod.rs
wasmtime-16.0.0 ./ext/cargo-vendor/semver-1.0.21/tests/util/mod.rs
wasmtime-15.0.1 ./ext/cargo-vendor/semver-1.0.21/tests/util/mod.rs
wasmtime-15.0.0 ./ext/cargo-vendor/semver-1.0.21/tests/util/mod.rs
wasmtime-14.0.4 ./ext/cargo-vendor/semver-1.0.20/tests/util/mod.rs