Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

Fix lints (#1867)

Evan Hutnike474f9bd4b56
diff --git a/rust/cloud-storage/comms_service_client/src/channels.rs b/rust/cloud-storage/comms_service_client/src/channels.rs
index 913a179720..d482f61418 100644
--- a/rust/cloud-storage/comms_service_client/src/channels.rs
+++ b/rust/cloud-storage/comms_service_client/src/channels.rs
@@ -71,7 +71,7 @@ impl CommsServiceClient {
.map_err(|e| {
ClientError::Generic(anyhow::anyhow!(
"unable to parse response from get_channels_external: {}",
- e.to_string()
+ e
))
})?;
@@ -101,7 +101,7 @@ impl CommsServiceClient {
.map_err(|e| {
ClientError::Generic(anyhow::anyhow!(
"unable to parse response from get_channel_metadata_external: {}",
- e.to_string()
+ e
))
})?;
@@ -147,7 +147,7 @@ impl CommsServiceClient {
.map_err(|e| {
ClientError::Generic(anyhow::anyhow!(
"unable to parse response from get_channel_transcript_external: {}",
- e.to_string()
+ e
))
})?;
diff --git a/rust/cloud-storage/comms_service_client/src/messages.rs b/rust/cloud-storage/comms_service_client/src/messages.rs
index 1e910fd7c5..71b24cafd7 100644
--- a/rust/cloud-storage/comms_service_client/src/messages.rs
+++ b/rust/cloud-storage/comms_service_client/src/messages.rs
@@ -33,7 +33,7 @@ impl CommsServiceClient {
.map_err(|e| {
ClientError::Generic(anyhow::anyhow!(
"unable to parse response from get_message_with_context: {}",
- e.to_string()
+ e
))
})?;
diff --git a/rust/cloud-storage/convert_service/src/process/convert.rs b/rust/cloud-storage/convert_service/src/process/convert.rs
index 6d6fcd8e1b..ac3f0c99a5 100644
--- a/rust/cloud-storage/convert_service/src/process/convert.rs
+++ b/rust/cloud-storage/convert_service/src/process/convert.rs
@@ -158,13 +158,8 @@ pub async fn convert(
.await
.context("unable to get object from S3")?;
- std::fs::create_dir(&directory).map_err(|e| {
- anyhow::anyhow!(
- "unable to create directory {}: {}",
- directory,
- e.to_string()
- )
- })?;
+ std::fs::create_dir(&directory)
+ .map_err(|e| anyhow::anyhow!("unable to create directory {}: {}", directory, e))?;
let mut file = File::create(&in_file_path).context("unable to create input file")?;
diff --git a/rust/cloud-storage/github/src/domain/service/sync/mod.rs b/rust/cloud-storage/github/src/domain/service/sync/mod.rs
index 36975cd76a..72387c96ed 100644
--- a/rust/cloud-storage/github/src/domain/service/sync/mod.rs
+++ b/rust/cloud-storage/github/src/domain/service/sync/mod.rs
@@ -288,6 +288,7 @@ impl<D: DocumentService, R: GithubSyncRepo, C: GithubSyncClient> GithubSyncServi
let expected = mac.finalize().into_bytes();
// constant-time comparison
+ #[allow(deprecated)]
if expected.as_slice().ct_eq(&sig_bytes).into() {
Ok(ValidatedGithubWebhookEvent::new(
event_type.to_string(),
diff --git a/rust/cloud-storage/gmail_client/src/attachments.rs b/rust/cloud-storage/gmail_client/src/attachments.rs
index 2cde301b9e..9084a930f0 100644
--- a/rust/cloud-storage/gmail_client/src/attachments.rs
+++ b/rust/cloud-storage/gmail_client/src/attachments.rs
@@ -45,15 +45,9 @@ pub async fn get_attachment_data(
.data
.ok_or_else(|| anyhow!("Gmail API response for attachment did not contain data field"))?;
- let decoded_bytes = match URL_SAFE.decode(base64_data) {
- Ok(decoded_bytes) => decoded_bytes,
- Err(e) => {
- return Err(anyhow!(
- "Failed to decode base64 body data: {}",
- e.to_string()
- ));
- }
- };
+ let decoded_bytes = URL_SAFE
+ .decode(base64_data)
+ .map_err(|e| anyhow!("Failed to decode base64 body data: {}", e))?;
Ok(decoded_bytes)
}