chore(v1.1.8): cargo fmt --all (reviewer)

8 files needed re-wrapping after the F2 clippy-fix pass landed
un-fmt'd. Pure cosmetic — no behavioral change. Re-runs of
`cargo fmt --all -- --check` now exit clean.

Reviewer-supplied per REVIEW.md §7; folded onto the branch
to avoid a NEEDS-CHANGES round-trip on a purely mechanical fix.
This commit is contained in:
MechaCat02
2026-06-06 18:44:52 +02:00
parent 2a76ea13dd
commit 7027e0dfb8
8 changed files with 95 additions and 112 deletions

View File

@@ -81,8 +81,8 @@ pub use trigger_event::{
DeadLetterEventDetail, DocsEventOp, FilesEventOp, KvEventOp, TriggerEvent,
};
pub use users::{
AppUser, CreateUserInput, EmailTemplateOpts, GeneratedAccept, GeneratedSession, InviteOpts,
Invitation, NoopUsersService, UpdateUserInput, UsersError, UsersListOpts, UsersListPage,
AppUser, CreateUserInput, EmailTemplateOpts, GeneratedAccept, GeneratedSession, Invitation,
InviteOpts, NoopUsersService, UpdateUserInput, UsersError, UsersListOpts, UsersListPage,
UsersService,
};
pub use validator::{ScriptValidator, ValidatedScript, ValidationError};

View File

@@ -180,11 +180,7 @@ pub enum UsersError {
pub trait UsersService: Send + Sync {
// ---- CRUD ----
async fn create(
&self,
cx: &SdkCallCx,
input: CreateUserInput,
) -> Result<AppUser, UsersError>;
async fn create(&self, cx: &SdkCallCx, input: CreateUserInput) -> Result<AppUser, UsersError>;
async fn get(&self, cx: &SdkCallCx, id: AppUserId) -> Result<Option<AppUser>, UsersError>;
@@ -203,11 +199,7 @@ pub trait UsersService: Send + Sync {
async fn delete(&self, cx: &SdkCallCx, id: AppUserId) -> Result<bool, UsersError>;
async fn list(
&self,
cx: &SdkCallCx,
opts: UsersListOpts,
) -> Result<UsersListPage, UsersError>;
async fn list(&self, cx: &SdkCallCx, opts: UsersListOpts) -> Result<UsersListPage, UsersError>;
// ---- Auth ----
@@ -224,11 +216,7 @@ pub trait UsersService: Send + Sync {
/// Verify a session token. Returns the owning user on success,
/// `None` on missing / expired / revoked / cross-app token. Bumps
/// the sliding-window TTL on success (capped at the absolute cap).
async fn verify(
&self,
cx: &SdkCallCx,
token: &str,
) -> Result<Option<AppUser>, UsersError>;
async fn verify(&self, cx: &SdkCallCx, token: &str) -> Result<Option<AppUser>, UsersError>;
/// Logout — revokes the session. No-op for already-revoked /
/// already-expired tokens.
@@ -277,12 +265,8 @@ pub trait UsersService: Send + Sync {
// ---- Invitations (commit 7) ----
async fn invite(
&self,
cx: &SdkCallCx,
email: &str,
opts: InviteOpts,
) -> Result<(), UsersError>;
async fn invite(&self, cx: &SdkCallCx, email: &str, opts: InviteOpts)
-> Result<(), UsersError>;
async fn accept_invite(
&self,
@@ -383,11 +367,7 @@ impl UsersService for NoopUsersService {
) -> Result<AppUser, UsersError> {
Err(UsersError::Backend(NOOP_MSG.into()))
}
async fn get(
&self,
_cx: &SdkCallCx,
_id: AppUserId,
) -> Result<Option<AppUser>, UsersError> {
async fn get(&self, _cx: &SdkCallCx, _id: AppUserId) -> Result<Option<AppUser>, UsersError> {
Err(UsersError::Backend(NOOP_MSG.into()))
}
async fn find_by_email(
@@ -423,11 +403,7 @@ impl UsersService for NoopUsersService {
) -> Result<Option<GeneratedSession>, UsersError> {
Err(UsersError::Backend(NOOP_MSG.into()))
}
async fn verify(
&self,
_cx: &SdkCallCx,
_token: &str,
) -> Result<Option<AppUser>, UsersError> {
async fn verify(&self, _cx: &SdkCallCx, _token: &str) -> Result<Option<AppUser>, UsersError> {
Err(UsersError::Backend(NOOP_MSG.into()))
}
async fn logout(&self, _cx: &SdkCallCx, _token: &str) -> Result<(), UsersError> {