Skip to content

Commit b7c477e

Browse files
committed
chore: cargo fmt
1 parent d26363d commit b7c477e

File tree

37 files changed

+200
-180
lines changed

37 files changed

+200
-180
lines changed

packages/common/api-helper/build/src/macro_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ pub fn __deserialize_query<T: DeserializeOwned + Send>(route: &Url) -> GlobalRes
237237
}
238238

239239
#[doc(hidden)]
240-
#[tracing::instrument(skip_all, name="setup_ctx")]
240+
#[tracing::instrument(skip_all, name = "setup_ctx")]
241241
pub async fn __with_ctx<
242242
A: auth::ApiAuth + Send,
243243
DB: chirp_workflow::db::Database + Sync + 'static,

packages/common/clickhouse-inserter/src/error.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ use thiserror::Error;
22

33
#[derive(Debug, Error)]
44
pub enum Error {
5-
#[error("failed to send event to ClickHouse inserter")]
6-
ChannelSendError,
5+
#[error("failed to send event to ClickHouse inserter")]
6+
ChannelSendError,
77

8-
#[error("serialization error: {0}")]
9-
SerializationError(#[source] serde_json::Error),
8+
#[error("serialization error: {0}")]
9+
SerializationError(#[source] serde_json::Error),
1010

11-
#[error("failed to build reqwest client: {0}")]
12-
ReqwestBuildError(#[source] reqwest::Error),
11+
#[error("failed to build reqwest client: {0}")]
12+
ReqwestBuildError(#[source] reqwest::Error),
1313

14-
#[error("failed to spawn background task")]
15-
TaskSpawnError,
16-
}
14+
#[error("failed to spawn background task")]
15+
TaskSpawnError,
16+
}

packages/common/config/src/config/server/rivet/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl Rivet {
177177
}
178178
}
179179

180-
impl Rivet {
180+
impl Rivet {
181181
pub fn default_cluster_id(&self) -> GlobalResult<Uuid> {
182182
if let Some(default_cluster_id) = self.default_cluster_id {
183183
ensure!(
@@ -190,7 +190,9 @@ impl Rivet {
190190
// Return default development clusters
191191
AccessKind::Development => Ok(default_dev_cluster::CLUSTER_ID),
192192
// No cluster configured
193-
AccessKind::Public | AccessKind::Private => bail!("`default_cluster_id` not configured"),
193+
AccessKind::Public | AccessKind::Private => {
194+
bail!("`default_cluster_id` not configured")
195+
}
194196
}
195197
}
196198
}
@@ -849,4 +851,3 @@ pub struct Edge {
849851
#[serde(default)]
850852
pub redirect_logs_dir: Option<PathBuf>,
851853
}
852-

packages/common/pools/src/db/redis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ pub async fn setup(config: Config) -> Result<HashMap<String, RedisPool>, Error>
6565
tracing::debug!("redis connected");
6666

6767
Ok(redis)
68-
}
68+
}

packages/common/pools/src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub enum Error {
7474
}
7575

7676
impl From<global_error::GlobalError> for Error {
77-
fn from(err: global_error::GlobalError) -> Self {
78-
Error::Global(err)
79-
}
77+
fn from(err: global_error::GlobalError) -> Self {
78+
Error::Global(err)
79+
}
8080
}

packages/common/pools/src/pools.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ impl Pools {
4646
let clickhouse_inserter = if let Some(vector_http) =
4747
config.server.as_ref().and_then(|x| x.vector_http.as_ref())
4848
{
49-
let inserter = clickhouse_inserter::create_inserter(&vector_http.host, vector_http.port)
50-
.map_err(Error::BuildClickHouseInserter)?;
49+
let inserter =
50+
clickhouse_inserter::create_inserter(&vector_http.host, vector_http.port)
51+
.map_err(Error::BuildClickHouseInserter)?;
5152
Some(inserter)
5253
} else {
5354
None

packages/common/pools/src/prelude.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pub use redis;
44
pub use sqlx;
55

66
pub use crate::{
7-
ClickHouseInserterHandle, ClickHousePool, CrdbPool, FdbPool, NatsPool, RedisPool, SqlitePool, __sql_query,
8-
__sql_query_as, __sql_query_as_raw, sql_execute, sql_fetch, sql_fetch_all, sql_fetch_many,
9-
sql_fetch_one, sql_fetch_optional,
7+
ClickHouseInserterHandle, ClickHousePool, CrdbPool, FdbPool, NatsPool, RedisPool, SqlitePool,
8+
__sql_query, __sql_query_as, __sql_query_as_raw, sql_execute, sql_fetch, sql_fetch_all,
9+
sql_fetch_many, sql_fetch_one, sql_fetch_optional,
1010
};

packages/common/util/core/src/format.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pub fn duration(ms: i64, relative: bool) -> String {
162162
let hours = (ms % 86_400_000) / 3_600_000;
163163
let minutes = (ms % 3_600_000) / 60_000;
164164
let seconds = (ms % 60_000) / 1_000;
165-
165+
166166
if days > 0 {
167167
parts.push(format!("{days}d"));
168168
}
@@ -181,5 +181,5 @@ pub fn duration(ms: i64, relative: bool) -> String {
181181
parts.push("ago".to_string());
182182
}
183183

184-
parts.join(" ")
184+
parts.join(" ")
185185
}

packages/core/api/actor/src/route/builds.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -517,13 +517,9 @@ pub async fn complete_build(
517517
..Default::default()
518518
};
519519

520-
edge_intercom_pegboard_prewarm_image(
521-
&config,
522-
&build_id.to_string(),
523-
json!({}),
524-
)
525-
.await
526-
.map_err(Into::<GlobalError>::into)
520+
edge_intercom_pegboard_prewarm_image(&config, &build_id.to_string(), json!({}))
521+
.await
522+
.map_err(Into::<GlobalError>::into)
527523
}
528524
})
529525
.buffer_unordered(16)

packages/core/api/provision/src/route/datacenters.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,7 @@ pub async fn servers(
5959
let servers_res = ctx
6060
.op(cluster::ops::datacenter::server_discovery::Input {
6161
datacenter_id,
62-
pool_types: query
63-
.pools
64-
.into_iter()
65-
.map(ApiInto::api_into)
66-
.collect(),
62+
pool_types: query.pools.into_iter().map(ApiInto::api_into).collect(),
6763
})
6864
.await?;
6965

0 commit comments

Comments
 (0)