Skip to content

Commit 2865024

Browse files
committed
Updated clippy error on format in debug
1 parent 6f312ba commit 2865024

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/lib.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ impl SwitchConnectionBuilder {
178178
/// Creates the [SwitchConnection] between the switch and controller.
179179
pub async fn connect(self) -> Result<SwitchConnection, RBFRTError> {
180180
debug!(
181-
"Start switch connection to: {}.",
182-
format!("http://{}:{}", self.ip, self.port)
181+
"Start switch connection to: http://{}:{}.",
182+
self.ip, self.port
183183
);
184184

185185
match BfRuntimeClient::connect(format!("http://{}:{}", self.ip, self.port)).await {
@@ -230,8 +230,8 @@ impl SwitchConnectionBuilder {
230230
connection.start_notification_thread(response_rx, digest_sender);
231231

232232
info!(
233-
"Switch connection to {} successful.",
234-
format!("{}:{}", connection.ip, connection.port)
233+
"Switch connection to {}:{} successful.",
234+
connection.ip, connection.port
235235
);
236236

237237
Ok(connection)
@@ -617,7 +617,7 @@ impl SwitchConnection {
617617
///
618618
/// See [TableOperation](crate::table::TableOperation) for supported operations, like synchronization of counters or registers.
619619
pub async fn execute_operation(&self, request: Request) -> Result<(), RBFRTError> {
620-
debug!("Execute operation {}", format!("{:?}", request));
620+
debug!("Execute operation {:?}", request);
621621
let req = request.request_type(RequestType::Operation);
622622

623623
let vec_req = vec![req];
@@ -691,7 +691,7 @@ impl SwitchConnection {
691691
/// The entry's key must not be present in the table to insert the new entry.
692692
/// See [update_table_entry](crate::SwitchConnection::update_table_entry) to update an existing entry.
693693
pub async fn write_table_entry(&self, request: Request) -> Result<(), RBFRTError> {
694-
debug!("Write table entry {}", format!("{:?}", request));
694+
debug!("Write table entry {:?}", request);
695695

696696
let req = request.request_type(RequestType::Write);
697697
let vec_req = vec![req];
@@ -706,7 +706,7 @@ impl SwitchConnection {
706706
/// The entries' keys must not be present in the table to insert the new entries.
707707
/// See [update_table_entries](crate::SwitchConnection::update_table_entries) to update existing entries.
708708
pub async fn write_table_entries(&self, requests: Vec<Request>) -> Result<(), RBFRTError> {
709-
debug!("Write table entry {}", format!("{:?}", requests));
709+
debug!("Write table entry {:?}", requests);
710710
let req = requests
711711
.iter()
712712
.map(|x| x.clone().request_type(RequestType::Write))
@@ -721,7 +721,7 @@ impl SwitchConnection {
721721
/// The entry's key must be present in the table to update the entry.
722722
/// See [write_table_entry](crate::SwitchConnection::write_table_entry) to insert a new entry.
723723
pub async fn update_table_entry(&self, request: Request) -> Result<(), RBFRTError> {
724-
debug!("Update table entry {}", format!("{:?}", request));
724+
debug!("Update table entry {:?}", request);
725725
let req = request.request_type(RequestType::Update);
726726
let vec_req = vec![req];
727727
self.dispatch_request(&vec_req).await?;
@@ -734,7 +734,7 @@ impl SwitchConnection {
734734
/// The entries' keys must be present in the tables to update the entries.
735735
/// See [write_table_entries](crate::SwitchConnection::write_table_entries) to insert new entries.
736736
pub async fn update_table_entries(&self, requests: Vec<Request>) -> Result<(), RBFRTError> {
737-
debug!("Update table entry {}", format!("{:?}", requests));
737+
debug!("Update table entry {:?}", requests);
738738
let req = requests
739739
.iter()
740740
.map(|x| x.clone().request_type(RequestType::Update))
@@ -748,7 +748,7 @@ impl SwitchConnection {
748748
///
749749
/// See [clear_table](crate::SwitchConnection::clear_table) to delete all entries inside the table.
750750
pub async fn delete_table_entry(&self, request: Request) -> Result<(), RBFRTError> {
751-
debug!("Delete table entry {}", format!("{:?}", request));
751+
debug!("Delete table entry {:?}", request);
752752
let req = request.request_type(RequestType::Delete);
753753

754754
let vec_req = vec![req];
@@ -762,7 +762,7 @@ impl SwitchConnection {
762762
///
763763
/// See [clear_tables](crate::SwitchConnection::clear_tables) to delete all entries inside the tables.
764764
pub async fn delete_table_entries(&self, request: Vec<Request>) -> Result<(), RBFRTError> {
765-
debug!("Delete table entries {}", format!("{:?}", request));
765+
debug!("Delete table entries {:?}", request);
766766
let vec_req = request
767767
.iter()
768768
.map(|x| x.clone().request_type(RequestType::Delete))
@@ -802,7 +802,7 @@ impl SwitchConnection {
802802
&self,
803803
request: register::Request,
804804
) -> Result<Register, RBFRTError> {
805-
debug!("Read register {}", format!("{:?}", request));
805+
debug!("Read register {:?}", request);
806806
let mut table_request = Request::new(request.get_name()).request_type(RequestType::Read);
807807

808808
if request.get_index().is_some() {
@@ -824,7 +824,7 @@ impl SwitchConnection {
824824
&self,
825825
requests: Vec<register::Request>,
826826
) -> Result<Register, RBFRTError> {
827-
debug!("Read register {}", format!("{:?}", requests));
827+
debug!("Read register {:?}", requests);
828828

829829
let name = requests.first().as_ref().unwrap().get_name();
830830

@@ -848,7 +848,7 @@ impl SwitchConnection {
848848

849849
/// Writes a value into a register.
850850
pub async fn write_register_entry(&self, request: register::Request) -> Result<(), RBFRTError> {
851-
debug!("Write register {}", format!("{:?}", request));
851+
debug!("Write register {:?}", request);
852852
let mut table_request = Request::new(request.get_name());
853853

854854
if request.get_index().is_none() {
@@ -874,7 +874,7 @@ impl SwitchConnection {
874874
&self,
875875
requests: Vec<register::Request>,
876876
) -> Result<(), RBFRTError> {
877-
debug!("Write register {}", format!("{:?}", requests));
877+
debug!("Write register {:?}", requests);
878878

879879
let mut write_req = vec![];
880880

0 commit comments

Comments
 (0)