Skip to content

Commit

Permalink
Fix uninlined_format_args.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamirTalwar committed Apr 3, 2024
1 parent 2a6588f commit ecf3299
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ missing_panics_doc = { level = "allow" }
module_name_repetitions = { level = "allow" }
must_use_candidate = { level = "allow" }
wildcard_imports = { level = "allow" }
# disable these for now, but we should probably fix them
uninlined_format_args = { level = "allow" }
2 changes: 1 addition & 1 deletion crates/sdk/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub async fn main() -> ExitCode {
match default_main::<Example>().await {
Ok(()) => ExitCode::SUCCESS,
Err(err) => {
eprintln!("{}", err);
eprintln!("{err}");
ExitCode::FAILURE
}
}
Expand Down
7 changes: 3 additions & 4 deletions crates/sdk/src/check_health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ pub enum HealthCheckError {
impl std::fmt::Display for HealthCheckError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
HealthCheckError::ParseError(inner) => write!(f, "URL parse error: {}", inner),
HealthCheckError::RequestError(inner) => write!(f, "request error: {}", inner),
HealthCheckError::ParseError(inner) => write!(f, "URL parse error: {inner}"),
HealthCheckError::RequestError(inner) => write!(f, "request error: {inner}"),
HealthCheckError::UnsuccessfulResponse { status, body } => {
write!(
f,
"unsuccessful response with status code: {}\nbody:\n{}",
status, body
"unsuccessful response with status code: {status}\nbody:\n{body}"
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/sdk/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Display for InvalidNode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}, at ", self.file_path.display())?;
for segment in &self.node_path {
write!(f, ".{}", segment)?;
write!(f, ".{segment}")?;
}
write!(f, ": {}", self.message)?;
Ok(())
Expand Down
4 changes: 2 additions & 2 deletions crates/sdk/src/default_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ where
);

let address = net::SocketAddr::new(serve_command.host, serve_command.port);
println!("Starting server on {}", address);
println!("Starting server on {address}");
axum::Server::bind(&address)
.serve(router.into_make_service())
.with_graceful_shutdown(async {
Expand Down Expand Up @@ -323,7 +323,7 @@ where

let expected_auth_header: Option<HeaderValue> =
service_token_secret.and_then(|service_token_secret| {
let expected_bearer = format!("Bearer {}", service_token_secret);
let expected_bearer = format!("Bearer {service_token_secret}");
HeaderValue::from_str(&expected_bearer).ok()
});

Expand Down

0 comments on commit ecf3299

Please sign in to comment.