style: Migrate to stable-only rustfmt configuration
- Remove nightly-only features from .rustfmt.toml and vendor/ss58-registry/rustfmt.toml - Removed features: imports_granularity, wrap_comments, comment_width, reorder_impl_items, spaces_around_ranges, binop_separator, match_arm_blocks, trailing_semicolon, trailing_comma - Format all 898 affected files with stable rustfmt - Ensures long-term reliability without nightly toolchain dependency
This commit is contained in:
@@ -445,8 +445,8 @@ impl Index {
|
||||
}
|
||||
// Check if we can evict enough lower priority statements to satisfy constraints
|
||||
for (entry, (_, len)) in account_rec.by_priority.iter() {
|
||||
if (account_rec.data_size - would_free_size + statement_len <= max_size) &&
|
||||
account_rec.by_priority.len() + 1 - evicted.len() <= max_count
|
||||
if (account_rec.data_size - would_free_size + statement_len <= max_size)
|
||||
&& account_rec.by_priority.len() + 1 - evicted.len() <= max_count
|
||||
{
|
||||
// Satisfied
|
||||
break;
|
||||
@@ -470,8 +470,8 @@ impl Index {
|
||||
}
|
||||
}
|
||||
// Now check global constraints as well.
|
||||
if !((self.total_size - would_free_size + statement_len <= self.options.max_total_size) &&
|
||||
self.entries.len() + 1 - evicted.len() <= self.options.max_total_statements)
|
||||
if !((self.total_size - would_free_size + statement_len <= self.options.max_total_size)
|
||||
&& self.entries.len() + 1 - evicted.len() <= self.options.max_total_statements)
|
||||
{
|
||||
log::debug!(
|
||||
target: LOG_TARGET,
|
||||
@@ -909,14 +909,16 @@ impl StatementStore for Store {
|
||||
}
|
||||
|
||||
match self.index.read().query(&hash) {
|
||||
IndexQuery::Expired =>
|
||||
IndexQuery::Expired => {
|
||||
if !source.can_be_resubmitted() {
|
||||
return SubmitResult::KnownExpired;
|
||||
},
|
||||
IndexQuery::Exists =>
|
||||
}
|
||||
},
|
||||
IndexQuery::Exists => {
|
||||
if !source.can_be_resubmitted() {
|
||||
return SubmitResult::Known;
|
||||
},
|
||||
}
|
||||
},
|
||||
IndexQuery::Unknown => {},
|
||||
}
|
||||
|
||||
@@ -957,8 +959,9 @@ impl StatementStore for Store {
|
||||
self.metrics.report(|metrics| metrics.validations_invalid.inc());
|
||||
return SubmitResult::Bad("Missing statement proof");
|
||||
},
|
||||
Err(InvalidStatement::InternalError) =>
|
||||
return SubmitResult::InternalError(Error::Runtime),
|
||||
Err(InvalidStatement::InternalError) => {
|
||||
return SubmitResult::InternalError(Error::Runtime)
|
||||
},
|
||||
};
|
||||
|
||||
let current_time = self.timestamp();
|
||||
|
||||
Reference in New Issue
Block a user