Skip to content

Consider switching cfg-if to cfg_select! #64

@polarathene

Description

@polarathene

cfg_select! was stabilized for Rust 1.95, at some point it might be worth replacing the current cfg-if dependency in favour of that? (although this would require a rust-version = "1.95" addition to the Cargo.toml, preventing earlier toolchains from getting any new updates?)

The cfg_if usage is only covered here:

dlmalloc-rs/src/lib.rs

Lines 76 to 93 in 852bee3

cfg_if::cfg_if! {
if #[cfg(target_family = "wasm")] {
#[path = "wasm.rs"]
mod sys;
} else if #[cfg(target_os = "windows")] {
#[path = "windows.rs"]
mod sys;
} else if #[cfg(target_os = "xous")] {
#[path = "xous.rs"]
mod sys;
} else if #[cfg(any(target_os = "linux", target_os = "macos"))] {
#[path = "unix.rs"]
mod sys;
} else {
#[path = "dummy.rs"]
mod sys;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions