time: exclude certain use statements and impl block on wasm32

otherwise the compiler will complain that they aren't used when
compiling the code for wasm32.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
This commit is contained in:
Shannon Sterz 2024-06-18 15:40:27 +02:00 committed by Wolfgang Bumiller
parent c547ea07ae
commit a4be52d4a6
3 changed files with 4 additions and 0 deletions

View File

@ -1,3 +1,4 @@
#[cfg(not(target_arch = "wasm32"))]
use std::convert::TryInto;
use anyhow::Error;

View File

@ -1,4 +1,6 @@
use std::cmp::{Ordering, PartialOrd};
#[cfg(not(target_arch = "wasm32"))]
use std::convert::{TryFrom, TryInto};
use anyhow::Error;

View File

@ -5,6 +5,7 @@ pub(crate) enum DateTimeValue {
Repeated(u32, u32, Option<u32>),
}
#[cfg(not(target_arch = "wasm32"))]
impl DateTimeValue {
// Test if the entry contains the value
pub fn contains(&self, value: u32) -> bool {