Skip to content

Commit 2b25748

Browse files
committed
fmt
1 parent aedf7e7 commit 2b25748

4 files changed

Lines changed: 19 additions & 6 deletions

File tree

libsql-server/src/lib.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,12 @@ where
10251025

10261026
let make_replication_svc = Box::new({
10271027
let disable_namespaces = self.disable_namespaces;
1028-
move |store, client_auth, idle_shutdown, collect_stats, is_internal| -> BoxReplicationService {
1028+
move |store,
1029+
client_auth,
1030+
idle_shutdown,
1031+
collect_stats,
1032+
is_internal|
1033+
-> BoxReplicationService {
10291034
Box::new(ReplicationLogService::new(
10301035
store,
10311036
idle_shutdown,
@@ -1058,7 +1063,12 @@ where
10581063

10591064
let make_replication_svc = Box::new({
10601065
let disable_namespaces = self.disable_namespaces;
1061-
move |store, client_auth, idle_shutdown, collect_stats, is_internal| -> BoxReplicationService {
1066+
move |store,
1067+
client_auth,
1068+
idle_shutdown,
1069+
collect_stats,
1070+
is_internal|
1071+
-> BoxReplicationService {
10621072
Box::new(ReplicationLogService::new(
10631073
store,
10641074
idle_shutdown,

libsql-server/src/rpc/replication/replication_log.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,17 @@ impl ReplicationLogService {
7676
req: &tonic::Request<T>,
7777
namespace: NamespaceName,
7878
) -> Result<(), Status> {
79-
if self.service_internal && req.metadata().get("libsql-proxied").is_some() || !self.service_internal {
79+
if self.service_internal && req.metadata().get("libsql-proxied").is_some()
80+
|| !self.service_internal
81+
{
8082
super::auth::authenticate(
8183
&self.namespaces,
8284
req,
8385
namespace,
8486
&self.user_auth_strategy,
8587
true,
8688
)
87-
.await
89+
.await
8890
} else {
8991
Ok(())
9092
}

libsql-server/src/rpc/replication/replication_log_proxy.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ impl ReplicationLogProxyService {
2121
}
2222

2323
fn mark_proxied<T>(mut req: tonic::Request<T>) -> tonic::Request<T> {
24-
req.metadata_mut().insert("libsql-proxied", AsciiMetadataValue::from_static("true"));
24+
req.metadata_mut()
25+
.insert("libsql-proxied", AsciiMetadataValue::from_static("true"));
2526
req
2627
}
2728

libsql-server/tests/embedded_replica/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ fn replicate_auth() {
14811481

14821482
assert!(db.sync().await.is_err());
14831483

1484-
// auth
1484+
// auth
14851485
let tmp = tempdir().unwrap();
14861486
let db = Database::open_with_remote_sync_connector(
14871487
tmp.path().join("embedded").to_str().unwrap(),

0 commit comments

Comments
 (0)