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:
@@ -324,8 +324,8 @@ impl HttpApi {
|
||||
return Err(HttpError::IoError);
|
||||
},
|
||||
|
||||
v @ HttpApiRequest::Dispatched(None) |
|
||||
v @ HttpApiRequest::Response(HttpApiRequestRp { sending_body: None, .. }) => {
|
||||
v @ HttpApiRequest::Dispatched(None)
|
||||
| v @ HttpApiRequest::Response(HttpApiRequestRp { sending_body: None, .. }) => {
|
||||
tracing::debug!(target: LOG_TARGET, id = %request_id.0, "Body sending already finished");
|
||||
|
||||
// We have already finished sending this body.
|
||||
@@ -347,8 +347,8 @@ impl HttpApi {
|
||||
for id in ids {
|
||||
match self.requests.get_mut(id) {
|
||||
Some(HttpApiRequest::NotDispatched(_, _)) => {},
|
||||
Some(HttpApiRequest::Dispatched(sending_body)) |
|
||||
Some(HttpApiRequest::Response(HttpApiRequestRp { sending_body, .. })) => {
|
||||
Some(HttpApiRequest::Dispatched(sending_body))
|
||||
| Some(HttpApiRequest::Response(HttpApiRequestRp { sending_body, .. })) => {
|
||||
let _ = sending_body.take();
|
||||
continue;
|
||||
},
|
||||
@@ -554,10 +554,11 @@ impl HttpApi {
|
||||
|
||||
if let future::MaybeDone::Done(next_body) = next_body {
|
||||
match next_body {
|
||||
Some(Ok(chunk)) =>
|
||||
Some(Ok(chunk)) => {
|
||||
if let Ok(chunk) = chunk.into_data() {
|
||||
response.current_read_chunk = Some(chunk.reader());
|
||||
},
|
||||
}
|
||||
},
|
||||
Some(Err(_)) => return Err(HttpError::IoError),
|
||||
None => return Ok(0), // eof
|
||||
}
|
||||
@@ -580,8 +581,9 @@ impl fmt::Debug for HttpApi {
|
||||
impl fmt::Debug for HttpApiRequest {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
HttpApiRequest::NotDispatched(_, _) =>
|
||||
f.debug_tuple("HttpApiRequest::NotDispatched").finish(),
|
||||
HttpApiRequest::NotDispatched(_, _) => {
|
||||
f.debug_tuple("HttpApiRequest::NotDispatched").finish()
|
||||
},
|
||||
HttpApiRequest::Dispatched(_) => f.debug_tuple("HttpApiRequest::Dispatched").finish(),
|
||||
HttpApiRequest::Response(HttpApiRequestRp { status_code, headers, .. }) => f
|
||||
.debug_tuple("HttpApiRequest::Response")
|
||||
@@ -761,10 +763,12 @@ impl fmt::Debug for HttpWorker {
|
||||
impl fmt::Debug for HttpWorkerRequest {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
HttpWorkerRequest::Dispatched(_) =>
|
||||
f.debug_tuple("HttpWorkerRequest::Dispatched").finish(),
|
||||
HttpWorkerRequest::ReadBody { .. } =>
|
||||
f.debug_tuple("HttpWorkerRequest::Response").finish(),
|
||||
HttpWorkerRequest::Dispatched(_) => {
|
||||
f.debug_tuple("HttpWorkerRequest::Dispatched").finish()
|
||||
},
|
||||
HttpWorkerRequest::ReadBody { .. } => {
|
||||
f.debug_tuple("HttpWorkerRequest::Response").finish()
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,8 +60,9 @@ pub fn deadline_to_future(
|
||||
future::maybe_done(match deadline.map(timestamp_from_now) {
|
||||
None => Either::Left(future::pending()),
|
||||
// Only apply delay if we need to wait a non-zero duration
|
||||
Some(duration) if duration <= Duration::from_secs(0) =>
|
||||
Either::Right(Either::Left(future::ready(()))),
|
||||
Some(duration) if duration <= Duration::from_secs(0) => {
|
||||
Either::Right(Either::Left(future::ready(())))
|
||||
},
|
||||
Some(duration) => Either::Right(Either::Right(futures_timer::Delay::new(duration))),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user