From baf5241147925480ff309fbc02231cdc18087a29 Mon Sep 17 00:00:00 2001 From: Kai Schmidt Date: Tue, 11 Jun 2024 18:52:07 -0700 Subject: [PATCH] add webcam feature to features combinations --- .github/features.ua | 2 +- src/run.rs | 1 + src/sys.rs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/features.ua b/.github/features.ua index a1ae58cc9..f9f1f30a2 100644 --- a/.github/features.ua +++ b/.github/features.ua @@ -4,7 +4,7 @@ Command ← {"cargo" "c" "--lib" "--no-default-features"} Features ← ( {"audio" "tls"} ⊂⟨ - {"gif,image,terminal_image" "lsp,raw_mode"} + {"gif,image,terminal_image,webcam" "lsp,raw_mode"} | {"audio_encode" "gif" "image" "terminal_image" "lsp" "native_sys" "raw_mode"} ⟩ ∊□"all" &args ) diff --git a/src/run.rs b/src/run.rs index 6f8479f7c..4f56117f8 100644 --- a/src/run.rs +++ b/src/run.rs @@ -862,6 +862,7 @@ code: pub fn error_with_span(&self, span: Span, message: impl ToString) -> UiuaError { UiuaErrorKind::Run(span.sp(message.to_string()), self.inputs().clone().into()).into() } + #[allow(dead_code)] pub(crate) fn error_maybe_span( &self, span: Option<&CodeSpan>, diff --git a/src/sys.rs b/src/sys.rs index 17cb4e546..3ca1a2427 100644 --- a/src/sys.rs +++ b/src/sys.rs @@ -1829,11 +1829,11 @@ impl SysOp { } SysOp::WebcamCapture => { let index = env.pop(1)?.as_nat(env, "Webcam index must be an integer")?; - let image = (env.rt.backend) + let _image = (env.rt.backend) .webcam_capture(index) .map_err(|e| env.error(e))?; #[cfg(feature = "image")] - env.push(rgb_image_to_array(image)); + env.push(rgb_image_to_array(_image)); #[cfg(not(feature = "image"))] return Err(env.error("Webcam capture is not supported in this environment")); }