Skip to content

Commit 410a752

Browse files
committed
Address code review feedback
1 parent 997e3ea commit 410a752

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

rs-matter/src/utils/zbus_proxies.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (c) 2025 Project CHIP Authors
3+
* Copyright (c) 2025-2026 Project CHIP Authors
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

rs-matter/src/utils/zbus_proxies/openthread/border_router.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,11 @@ pub trait BorderRouter {
530530
#[allow(clippy::too_many_arguments)]
531531
fn attach(
532532
&self,
533-
network_key: Vec<u8>,
533+
network_key: &[u8],
534534
panid: u16,
535535
network_name: &str,
536536
ext_panid: u64,
537-
pskc: Vec<u8>,
537+
pskc: &[u8],
538538
channel_mask: u32,
539539
) -> zbus::Result<()>;
540540

@@ -544,7 +544,7 @@ pub trait BorderRouter {
544544
/// Returns the effective delay in milliseconds before the new dataset
545545
/// takes effect. `0` means the device has already attached to the new
546546
/// network by the time this call returns.
547-
fn attach_all_nodes_to(&self, dataset: Vec<u8>) -> zbus::Result<i64>;
547+
fn attach_all_nodes_to(&self, dataset: &[u8]) -> zbus::Result<i64>;
548548

549549
/// Detach from the current Thread network.
550550
fn detach(&self) -> zbus::Result<()>;
@@ -578,31 +578,31 @@ pub trait BorderRouter {
578578

579579
/// Add an external routing rule, advertising this device as the border
580580
/// router for `route.prefix`.
581-
fn add_external_route(&self, route: ExternalRoute) -> zbus::Result<()>;
581+
fn add_external_route(&self, route: &ExternalRoute) -> zbus::Result<()>;
582582

583583
/// Remove a previously-added external routing rule.
584-
fn remove_external_route(&self, prefix: Ip6Prefix) -> zbus::Result<()>;
584+
fn remove_external_route(&self, prefix: &Ip6Prefix) -> zbus::Result<()>;
585585

586586
/// Add an on-mesh prefix to the Thread network.
587-
fn add_on_mesh_prefix(&self, prefix: OnMeshPrefix) -> zbus::Result<()>;
587+
fn add_on_mesh_prefix(&self, prefix: &OnMeshPrefix) -> zbus::Result<()>;
588588

589589
/// Remove a previously-added on-mesh prefix.
590-
fn remove_on_mesh_prefix(&self, prefix: Ip6Prefix) -> zbus::Result<()>;
590+
fn remove_on_mesh_prefix(&self, prefix: &Ip6Prefix) -> zbus::Result<()>;
591591

592592
/// Enable or disable the Border Agent (the MeshCoP responder used by
593593
/// commissioners).
594594
fn set_border_agent_enabled(&self, enable: bool) -> zbus::Result<()>;
595595

596596
/// Replace the vendor-specific MeshCoP TXT entries advertised by the
597597
/// Border Agent.
598-
fn update_vendor_mesh_cop_txt_entries(&self, update: Vec<VendorTxtEntry>) -> zbus::Result<()>;
598+
fn update_vendor_mesh_cop_txt_entries(&self, update: &[VendorTxtEntry]) -> zbus::Result<()>;
599599

600600
/// Subscribe to one or more OTBR properties for batched reads.
601601
///
602602
/// The OTBR introspection declares no out-parameter for this method, so
603603
/// the proxy returns `()`. Results are delivered out-of-band via the
604604
/// standard properties interface.
605-
fn get_properties(&self, properties: Vec<String>) -> zbus::Result<()>;
605+
fn get_properties(&self, properties: &[&str]) -> zbus::Result<()>;
606606

607607
/// Detach and forget the network credentials.
608608
fn leave_network(&self) -> zbus::Result<()>;
@@ -850,7 +850,7 @@ pub trait BorderRouter {
850850

851851
/// Set the /64 mesh-local prefix.
852852
#[zbus(property)]
853-
fn set_mesh_local_prefix(&self, value: Vec<u8>) -> zbus::Result<()>;
853+
fn set_mesh_local_prefix(&self, value: &[u8]) -> zbus::Result<()>;
854854

855855
/// Current link mode.
856856
#[zbus(property)]
@@ -868,15 +868,15 @@ pub trait BorderRouter {
868868
/// Set the Active Operational Dataset (TLV-encoded); triggers a
869869
/// re-attach.
870870
#[zbus(property)]
871-
fn set_active_dataset_tlvs(&self, value: Vec<u8>) -> zbus::Result<()>;
871+
fn set_active_dataset_tlvs(&self, value: &[u8]) -> zbus::Result<()>;
872872

873873
/// Thread feature flags (`proto/feature_flag.proto`), raw bytes.
874874
#[zbus(property)]
875875
fn feature_flag_list_data(&self) -> zbus::Result<Vec<u8>>;
876876

877877
/// Set the Thread feature flags (`proto/feature_flag.proto`).
878878
#[zbus(property)]
879-
fn set_feature_flag_list_data(&self, value: Vec<u8>) -> zbus::Result<()>;
879+
fn set_feature_flag_list_data(&self, value: &[u8]) -> zbus::Result<()>;
880880

881881
/// Radio region code (ISO 3166-1).
882882
#[zbus(property)]

0 commit comments

Comments
 (0)