Skip to content

Commit

Permalink
Make the sample code work on the web
Browse files Browse the repository at this point in the history
  • Loading branch information
temeddix committed Jun 17, 2024
1 parent 64af97c commit 092ee1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flutter_ffi_plugin/example/native/sample_crate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pub fn get_hardward_id() -> Result<String> {
Ok(hwid)
}
#[cfg(not(any(target_os = "windows", target_os = "macos", target_os = "linux")))]
pub fn get_hardward_id() -> Option<String> {
None
pub fn get_hardward_id() -> Result<String> {
Ok(String::from("UNSUPPORTED"))
}

// `chrono` supports all platforms, including web.
Expand Down

0 comments on commit 092ee1e

Please sign in to comment.