asomers / mockall

A powerful mock object library for Rust
Apache License 2.0
1.5k stars 62 forks source link

Changed example to use a C function available also on Windows #473

Closed vikz95 closed 1 year ago

vikz95 commented 1 year ago

getuid() is a clib function that's only available on UNIX systems, this pull request uses the time() function that's also available on Windows.

Now when running cargo test on Windows the command doesn't fail with error message:

error[E0601]: `main` function not found in crate `ffi`
  --> mockall\examples\ffi.rs:35:2
   |
35 | }
   |  ^ consider adding a `main` function to `mockall\examples\ffi.rs`