fix(build): clean remaining validation issues
Convert peripheral tool collections into Arc-backed tools so all-features builds compile cleanly. Gate the Landlock Path import behind the Linux sandbox cfg to remove the remaining warning during validation.
This commit is contained in:
parent
c5c82c764e
commit
4fe9f8c418
@ -163,7 +163,12 @@ pub async fn create_peripheral_tools(config: &PeripheralsConfig) -> Result<Vec<A
|
||||
{
|
||||
match rpi::RpiGpioPeripheral::connect_from_config(board).await {
|
||||
Ok(peripheral) => {
|
||||
tools.extend(peripheral.tools());
|
||||
tools.extend(
|
||||
peripheral
|
||||
.tools()
|
||||
.into_iter()
|
||||
.map(|tool| Arc::<dyn Tool>::from(tool)),
|
||||
);
|
||||
tracing::info!(board = %board.board, "RPi GPIO peripheral connected");
|
||||
}
|
||||
Err(e) => {
|
||||
@ -189,7 +194,7 @@ pub async fn create_peripheral_tools(config: &PeripheralsConfig) -> Result<Vec<A
|
||||
tracing::warn!("Peripheral {} connect warning (continuing)", p.name());
|
||||
}
|
||||
serial_transports.push((board.board.clone(), p.transport()));
|
||||
tools.extend(p.tools());
|
||||
tools.extend(p.tools().into_iter().map(Arc::<dyn Tool>::from));
|
||||
if board.board == "arduino-uno" {
|
||||
if let Some(ref path) = board.path {
|
||||
tools.push(Arc::new(arduino_upload::ArduinoUploadTool::new(
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
use landlock::{AccessFs, PathBeneath, PathFd, Ruleset, RulesetAttr, RulesetCreatedAttr};
|
||||
|
||||
use crate::security::traits::Sandbox;
|
||||
#[cfg(all(feature = "sandbox-landlock", target_os = "linux"))]
|
||||
use std::path::Path;
|
||||
|
||||
/// Landlock sandbox backend for Linux
|
||||
|
||||
Loading…
Reference in New Issue
Block a user