all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Shannon Sterz <s.sterz@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox] time: exclude certain `use` statements and `impl` block on wasm32
Date: Tue, 18 Jun 2024 15:40:27 +0200	[thread overview]
Message-ID: <20240618134027.246181-1-s.sterz@proxmox.com> (raw)

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>
---
 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<u32>),
 }
 
+#[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


             reply	other threads:[~2024-06-18 13:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 13:40 Shannon Sterz [this message]
2024-06-19 12:56 ` [pbs-devel] applied: " Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240618134027.246181-1-s.sterz@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal