Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryOsterman committed Nov 7, 2024
1 parent 094575b commit 2247665
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sdk/core/azure_core_amqp/src/receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ mod tests {
);
assert!(receiver_options.properties.is_some());
let properties = receiver_options.properties.clone().unwrap();
assert!(properties.contains_key(&AmqpSymbol::from("key").into()));
assert!(properties.contains_key(&AmqpSymbol::from("key")));
assert_eq!(
*properties.get(&AmqpSymbol::from("key")).unwrap(),
AmqpValue::String("value".to_string())
Expand Down
7 changes: 2 additions & 5 deletions sdk/eventhubs/azure_messaging_eventhubs/src/consumer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ impl ConsumerClient {
Ok(())
}

async fn ensure_connection(&self, url: &String) -> Result<()> {
async fn ensure_connection(&self, url: &str) -> Result<()> {
if self.connection.get().is_none() {
let connection = AmqpConnection::new();
connection
Expand Down Expand Up @@ -751,7 +751,6 @@ mod tests {
let start_position = StartPosition {
location: StartLocation::SequenceNumber(sequence_number),
inclusive: true,
..Default::default()
};
assert_eq!(
StartPosition::start_expression(&Some(start_position)),
Expand Down Expand Up @@ -783,7 +782,7 @@ mod tests {
start_position.location,
StartLocation::EnqueuedTime(enqueued_time)
);
assert_eq!(start_position.inclusive, false);
assert!(!start_position.inclusive);
assert_eq!(
StartPosition::start_expression(&Some(start_position)),
format!(
Expand All @@ -798,7 +797,6 @@ mod tests {
let start_position = StartPosition {
location: StartLocation::EnqueuedTime(enqueued_time),
inclusive: true,
..Default::default()
};
assert_eq!(
StartPosition::start_expression(&Some(start_position)),
Expand Down Expand Up @@ -832,7 +830,6 @@ mod tests {
let start_position = StartPosition {
location: StartLocation::Offset(offset.clone()),
inclusive: true,
..Default::default()
};
assert_eq!(
"amqp.annotation.x-opt-offset >='12345'",
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventhubs/azure_messaging_eventhubs/src/producer/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ struct EventDataBatchState {
/// ```
pub struct EventDataBatch<'a> {
producer: &'a ProducerClient,

batch_state: Mutex<EventDataBatchState>,
max_size_in_bytes: u64,
partition_key: Option<String>,
Expand Down Expand Up @@ -372,7 +371,6 @@ mod tests {
max_size_in_bytes: Some(1024),
partition_key: Some("pk".to_string()),
partition_id: Some("pid".to_string()),
..Default::default()
};

assert_eq!(options.max_size_in_bytes, Some(1024));
Expand Down

0 comments on commit 2247665

Please sign in to comment.