Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33186459
D15378.1768534908.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D15378.1768534908.diff
View Options
diff --git a/native/native_rust_library/src/identity/device_list.rs b/native/native_rust_library/src/identity/device_list.rs
--- a/native/native_rust_library/src/identity/device_list.rs
+++ b/native/native_rust_library/src/identity/device_list.rs
@@ -160,7 +160,7 @@
.collect();
let result = PeersDeviceLists {
- users_device_lists: users_device_lists,
+ users_device_lists,
users_devices_platform_details: nested_users_devices_platform_details,
};
diff --git a/services/blob/src/database/client.rs b/services/blob/src/database/client.rs
--- a/services/blob/src/database/client.rs
+++ b/services/blob/src/database/client.rs
@@ -1,4 +1,3 @@
-use aws_config::default_provider::retry_config;
use aws_sdk_dynamodb::{
operation::put_item::PutItemOutput,
types::{
diff --git a/services/commtest/src/identity/device.rs b/services/commtest/src/identity/device.rs
--- a/services/commtest/src/identity/device.rs
+++ b/services/commtest/src/identity/device.rs
@@ -97,7 +97,6 @@
let username: String = rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(7)
- .map(char::from)
.collect();
let device_keys = keys.map(Cow::Borrowed).unwrap_or_default();
diff --git a/services/commtest/src/identity/olm_account.rs b/services/commtest/src/identity/olm_account.rs
--- a/services/commtest/src/identity/olm_account.rs
+++ b/services/commtest/src/identity/olm_account.rs
@@ -132,6 +132,5 @@
rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(43)
- .map(char::from)
.collect()
}
diff --git a/services/identity/src/database.rs b/services/identity/src/database.rs
--- a/services/identity/src/database.rs
+++ b/services/identity/src/database.rs
@@ -1043,13 +1043,12 @@
.item
.map(DBIdentity::try_from)
.transpose()
- .map_err(|e| {
+ .inspect_err(|_| {
error!(
user_id = redact_sensitive_data(user_id),
errorType = error_types::GENERIC_DB_LOG,
"Database item is missing an identifier"
);
- e
})
}
diff --git a/services/identity/src/database/device_list.rs b/services/identity/src/database/device_list.rs
--- a/services/identity/src/database/device_list.rs
+++ b/services/identity/src/database/device_list.rs
@@ -1,3 +1,5 @@
+#![allow(clippy::result_large_err)]
+
use std::{
collections::{HashMap, HashSet},
sync::LazyLock,
@@ -31,7 +33,6 @@
USERS_TABLE_PARTITION_KEY,
},
ddb_utils::is_transaction_conflict,
- device_list::RawDeviceList,
error::{DeviceListError, Error},
grpc_services::{
protos::{self, unauth::DeviceType},
@@ -160,25 +161,6 @@
pub raw_payload: String,
}
-impl DeviceListUpdate {
- pub fn new_unsigned(
- devices: Vec<String>,
- ) -> Result<Self, crate::error::Error> {
- let timestamp = Utc::now();
- let raw_list = RawDeviceList {
- devices: devices.clone(),
- timestamp: timestamp.timestamp_millis(),
- };
- Ok(Self {
- devices,
- timestamp,
- current_primary_signature: None,
- last_primary_signature: None,
- raw_payload: serde_json::to_string(&raw_list)?,
- })
- }
-}
-
impl DeviceRow {
#[tracing::instrument(skip_all)]
pub fn from_device_key_upload(
diff --git a/services/identity/src/database/farcaster.rs b/services/identity/src/database/farcaster.rs
--- a/services/identity/src/database/farcaster.rs
+++ b/services/identity/src/database/farcaster.rs
@@ -24,6 +24,7 @@
pub struct FarcasterUserData(pub FarcasterUser);
impl DatabaseClient {
+ #[allow(clippy::result_large_err)]
#[tracing::instrument(skip_all)]
pub async fn get_farcaster_users(
&self,
diff --git a/services/identity/src/device_list.rs b/services/identity/src/device_list.rs
--- a/services/identity/src/device_list.rs
+++ b/services/identity/src/device_list.rs
@@ -331,7 +331,7 @@
let previous_set: HashSet<_> = previous_device_list.iter().collect();
let new_set: HashSet<_> = new_device_list.iter().collect();
- return new_set.difference(&previous_set).count() == 1;
+ new_set.difference(&previous_set).count() == 1
}
/// Returns `true` if `new_device_list` contains exactly one fewer device
@@ -343,7 +343,7 @@
let previous_set: HashSet<_> = previous_device_list.iter().collect();
let new_set: HashSet<_> = new_device_list.iter().collect();
- return previous_set.difference(&new_set).count() == 1;
+ previous_set.difference(&new_set).count() == 1
}
fn primary_device_changed(
diff --git a/services/reports/src/service.rs b/services/reports/src/service.rs
--- a/services/reports/src/service.rs
+++ b/services/reports/src/service.rs
@@ -201,6 +201,7 @@
email: ReportEmail,
}
+#[allow(clippy::result_large_err)]
fn process_report(
input: ReportInput,
user_id: Option<String>,
diff --git a/services/tunnelbroker/src/farcaster/mod.rs b/services/tunnelbroker/src/farcaster/mod.rs
--- a/services/tunnelbroker/src/farcaster/mod.rs
+++ b/services/tunnelbroker/src/farcaster/mod.rs
@@ -24,6 +24,7 @@
}
impl FarcasterClient {
+ #[allow(clippy::result_large_err)]
pub fn new(
farcaster_api_url: reqwest::Url,
db_client: DatabaseClient,
diff --git a/services/tunnelbroker/src/token_distributor/token_connection.rs b/services/tunnelbroker/src/token_distributor/token_connection.rs
--- a/services/tunnelbroker/src/token_distributor/token_connection.rs
+++ b/services/tunnelbroker/src/token_distributor/token_connection.rs
@@ -40,6 +40,7 @@
}
impl TokenConnection {
+ #[allow(clippy::too_many_arguments)]
pub(crate) fn start(
db: DatabaseClient,
config: TokenDistributorConfig,
@@ -334,7 +335,7 @@
);
}
}
- FarcasterPayload::RefreshSelfDirectCastsInbox { payload, .. } => {
+ FarcasterPayload::RefreshSelfDirectCastsInbox { .. } => {
debug!("Processing refresh-self-direct-casts-inbox message");
}
FarcasterPayload::Unseen { .. } => {
diff --git a/shared/comm-lib/src/database.rs b/shared/comm-lib/src/database.rs
--- a/shared/comm-lib/src/database.rs
+++ b/shared/comm-lib/src/database.rs
@@ -703,10 +703,8 @@
AttributeValue::Bs(set) => set.len(),
AttributeValue::N(_) => NUMBER_BYTE_SIZE,
AttributeValue::Ns(set) => set.len() * NUMBER_BYTE_SIZE,
- AttributeValue::S(string) => string.as_bytes().len(),
- AttributeValue::Ss(set) => {
- set.iter().map(|string| string.as_bytes().len()).sum()
- }
+ AttributeValue::S(string) => string.len(),
+ AttributeValue::Ss(set) => set.iter().map(|string| string.len()).sum(),
_ => return Err(UnknownAttributeTypeError),
};
@@ -717,7 +715,7 @@
value: &AttributeMap,
) -> Result<usize, UnknownAttributeTypeError> {
value.iter().try_fold(0, |a, (attr, value)| {
- Ok(a + attr.as_bytes().len() + calculate_attr_value_size_in_db(value)?)
+ Ok(a + attr.len() + calculate_attr_value_size_in_db(value)?)
})
}
diff --git a/shared/comm-opaque2/src/server/login.rs b/shared/comm-opaque2/src/server/login.rs
--- a/shared/comm-opaque2/src/server/login.rs
+++ b/shared/comm-opaque2/src/server/login.rs
@@ -11,7 +11,7 @@
#[derive(Clone, Serialize, Deserialize, Debug)]
pub struct Login {
state: Option<ServerLogin<Cipher>>,
- #[serde(default = "OsRng::default", skip)]
+ #[serde(default, skip)]
rng: OsRng,
pub session_key: Option<Vec<u8>>,
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 16, 3:41 AM (19 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5941693
Default Alt Text
D15378.1768534908.diff (7 KB)
Attached To
Mode
D15378: Fix clippy warnings
Attached
Detach File
Event Timeline
Log In to Comment