Skip to content

Unable to Active v4 Feature for Example #522

@ca-mantis-shrimp

Description

@ca-mantis-shrimp

Describe the bug
Im just trying to write some learning tests and i'm having trouble enabling the "v4" feature for this crate.

To Reproduce
main.rs

use uuid::Uuid;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    #[cfg(feature = "v4")] {
        let my_uuid = Uuid::new_v4()?;
        println!("{}", my_uuid);
    }
    Ok(())
}

Cargo.toml

[dependencies]

[dependencies.uuid]
version = "0.8"
features = ["serde", "v4"]

I've tried every permutation of the dependency setup but I can't get this example build to run! it runs successfully, but just doesn't do anything
Expected behavior
the example of building a v4 UUID and Printing it runs
Screenshots
If applicable, add screenshots to help explain your problem.
main with LSP diagnostics
run example

Additional context
Windows on WSL if that matters, but i don't think it should?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions