From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 52D9B1FF37F for ; Tue, 18 Jun 2024 15:41:01 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A8A9A1BC16; Tue, 18 Jun 2024 15:41:03 +0200 (CEST) From: Shannon Sterz To: pbs-devel@lists.proxmox.com Date: Tue, 18 Jun 2024 15:40:27 +0200 Message-Id: <20240618134027.246181-1-s.sterz@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.299 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pbs-devel] [PATCH proxmox] time: exclude certain `use` statements and `impl` block on wasm32 X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" otherwise the compiler will complain that they aren't used when compiling the code for wasm32. Signed-off-by: Shannon Sterz --- proxmox-time/src/calendar_event.rs | 1 + proxmox-time/src/daily_duration.rs | 2 ++ proxmox-time/src/date_time_value.rs | 1 + 3 files changed, 4 insertions(+) diff --git a/proxmox-time/src/calendar_event.rs b/proxmox-time/src/calendar_event.rs index 76883137..4a96c83e 100644 --- a/proxmox-time/src/calendar_event.rs +++ b/proxmox-time/src/calendar_event.rs @@ -1,3 +1,4 @@ +#[cfg(not(target_arch = "wasm32"))] use std::convert::TryInto; use anyhow::Error; diff --git a/proxmox-time/src/daily_duration.rs b/proxmox-time/src/daily_duration.rs index 3b3d5fdd..9a8bdfc7 100644 --- a/proxmox-time/src/daily_duration.rs +++ b/proxmox-time/src/daily_duration.rs @@ -1,4 +1,6 @@ use std::cmp::{Ordering, PartialOrd}; + +#[cfg(not(target_arch = "wasm32"))] use std::convert::{TryFrom, TryInto}; use anyhow::Error; diff --git a/proxmox-time/src/date_time_value.rs b/proxmox-time/src/date_time_value.rs index 72b4c2ee..4dd79d36 100644 --- a/proxmox-time/src/date_time_value.rs +++ b/proxmox-time/src/date_time_value.rs @@ -5,6 +5,7 @@ pub(crate) enum DateTimeValue { Repeated(u32, u32, Option), } +#[cfg(not(target_arch = "wasm32"))] impl DateTimeValue { // Test if the entry contains the value pub fn contains(&self, value: u32) -> bool { -- 2.39.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel