Skip to content

Commit 72c2cec

Browse files
committed
lints
1 parent 11d5e99 commit 72c2cec

File tree

109 files changed

+621
-653
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+621
-653
lines changed

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api_auth/src/accept.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
use bencher_endpoint::{CorsResponse, Endpoint, Get, Post, ResponseAccepted};
2-
use bencher_json::{system::auth::JsonAccept, JsonAuthAck};
2+
use bencher_json::{JsonAuthAck, system::auth::JsonAccept};
33
use bencher_schema::{
44
conn_lock,
55
context::ApiContext,
66
model::user::auth::{AuthUser, BearerToken},
77
};
8-
use dropshot::{endpoint, HttpError, RequestContext, TypedBody};
8+
use dropshot::{HttpError, RequestContext, TypedBody, endpoint};
99

10-
#[expect(clippy::no_effect_underscore_binding, clippy::unused_async)]
1110
#[endpoint {
1211
method = OPTIONS,
1312
path = "/v0/auth/accept",

lib/api_auth/src/confirm.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
use bencher_endpoint::{CorsResponse, Endpoint, Post, ResponseOk};
2-
use bencher_json::{system::auth::JsonAuthUser, JsonConfirm};
2+
use bencher_json::{JsonConfirm, system::auth::JsonAuthUser};
33
use bencher_schema::{
44
conn_lock,
55
context::ApiContext,
66
error::{issue_error, unauthorized_error},
77
model::user::QueryUser,
88
};
9-
use dropshot::{endpoint, HttpError, RequestContext, TypedBody};
9+
use dropshot::{HttpError, RequestContext, TypedBody, endpoint};
1010

1111
use super::CLIENT_TOKEN_TTL;
1212

13-
#[expect(clippy::no_effect_underscore_binding, clippy::unused_async)]
1413
#[endpoint {
1514
method = OPTIONS,
1615
path = "/v0/auth/confirm",

lib/api_auth/src/github.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
#![cfg(feature = "plus")]
22

33
use bencher_endpoint::{CorsResponse, Endpoint, Get, Post, ResponseAccepted};
4-
use bencher_json::{system::auth::JsonOAuth, JsonAuthUser, JsonSignup, PlanLevel};
4+
use bencher_json::{JsonAuthUser, JsonSignup, PlanLevel, system::auth::JsonOAuth};
55
use bencher_schema::{
66
conn_lock,
77
context::ApiContext,
88
error::{issue_error, payment_required_error, unauthorized_error},
99
model::{
10-
organization::{plan::LicenseUsage, QueryOrganization},
10+
organization::{QueryOrganization, plan::LicenseUsage},
1111
user::{InsertUser, QueryUser},
1212
},
1313
};
14-
use dropshot::{endpoint, HttpError, RequestContext, TypedBody};
14+
use dropshot::{HttpError, RequestContext, TypedBody, endpoint};
1515
use slog::Logger;
1616

1717
use super::CLIENT_TOKEN_TTL;
1818

1919
pub const GITHUB_OAUTH2: &str = "GitHub OAuth2";
2020

21-
#[expect(clippy::no_effect_underscore_binding, clippy::unused_async)]
2221
#[endpoint {
2322
method = OPTIONS,
2423
path = "/v0/auth/github",
@@ -64,8 +63,8 @@ async fn post_inner(
6463
.is_empty()
6564
{
6665
return Err(payment_required_error(
67-
"You must have a valid Bencher Plus Enterprise license for at least one organization on the server to use GitHub OAuth2",
68-
));
66+
"You must have a valid Bencher Plus Enterprise license for at least one organization on the server to use GitHub OAuth2",
67+
));
6968
}
7069

7170
let (name, email) = github

lib/api_auth/src/login.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ use bencher_schema::{
66
error::issue_error,
77
model::user::QueryUser,
88
};
9-
use dropshot::{endpoint, HttpError, RequestContext, TypedBody};
9+
use dropshot::{HttpError, RequestContext, TypedBody, endpoint};
1010
use slog::Logger;
1111

1212
use super::AUTH_TOKEN_TTL;
1313
use super::TOKEN_ARG;
1414

15-
#[expect(clippy::no_effect_underscore_binding, clippy::unused_async)]
1615
#[endpoint {
1716
method = OPTIONS,
1817
path = "/v0/auth/login",

lib/api_auth/src/signup.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
use bencher_endpoint::{CorsResponse, Endpoint, Post, ResponseAccepted};
2-
use bencher_json::{system::auth::JsonAuthAck, JsonSignup};
2+
use bencher_json::{JsonSignup, system::auth::JsonAuthAck};
33
use bencher_schema::{
44
conn_lock,
55
context::{ApiContext, Body, ButtonBody, Message},
66
error::{forbidden_error, issue_error},
77
model::user::InsertUser,
88
};
9-
use dropshot::{endpoint, HttpError, RequestContext, TypedBody};
9+
use dropshot::{HttpError, RequestContext, TypedBody, endpoint};
1010
use slog::Logger;
1111

1212
use super::AUTH_TOKEN_TTL;
1313
use super::TOKEN_ARG;
1414

15-
#[expect(clippy::no_effect_underscore_binding, clippy::unused_async)]
1615
#[endpoint {
1716
method = OPTIONS,
1817
path = "/v0/auth/signup",

lib/api_checkout/src/checkout.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ use bencher_schema::{
1515
user::auth::{AuthUser, BearerToken},
1616
},
1717
};
18-
use dropshot::{endpoint, HttpError, RequestContext, TypedBody};
18+
use dropshot::{HttpError, RequestContext, TypedBody, endpoint};
1919

20-
#[expect(clippy::no_effect_underscore_binding, clippy::unused_async)]
2120
#[endpoint {
2221
method = OPTIONS,
2322
path = "/v0/checkout",

lib/api_organizations/src/allowed.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use bencher_endpoint::{CorsResponse, Endpoint, Get, ResponseOk};
2-
use bencher_json::{organization::OrganizationPermission, JsonAllowed, ResourceId};
2+
use bencher_json::{JsonAllowed, ResourceId, organization::OrganizationPermission};
33
use bencher_schema::{
44
conn_lock,
55
context::ApiContext,
66
model::{
7-
organization::{organization_role::Permission, QueryOrganization},
7+
organization::{QueryOrganization, organization_role::Permission},
88
user::auth::{AuthUser, BearerToken},
99
},
1010
};
11-
use dropshot::{endpoint, HttpError, Path, RequestContext};
11+
use dropshot::{HttpError, Path, RequestContext, endpoint};
1212
use schemars::JsonSchema;
1313
use serde::Deserialize;
1414

@@ -20,7 +20,6 @@ pub struct OrgAllowedParams {
2020
pub permission: OrganizationPermission,
2121
}
2222

23-
#[expect(clippy::no_effect_underscore_binding, clippy::unused_async)]
2423
#[endpoint {
2524
method = OPTIONS,
2625
path = "/v0/organizations/{organization}/allowed/{permission}",

lib/api_organizations/src/claim.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use bencher_schema::{
88
user::auth::{AuthUser, BearerToken},
99
},
1010
};
11-
use dropshot::{endpoint, HttpError, Path, RequestContext, TypedBody};
11+
use dropshot::{HttpError, Path, RequestContext, TypedBody, endpoint};
1212
use schemars::JsonSchema;
1313
use serde::Deserialize;
1414

@@ -18,7 +18,6 @@ pub struct OrgClaimParams {
1818
pub organization: ResourceId,
1919
}
2020

21-
#[expect(clippy::no_effect_underscore_binding, clippy::unused_async)]
2221
#[endpoint {
2322
method = OPTIONS,
2423
path = "/v0/organizations/{organization}/claim",

lib/api_organizations/src/members.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,29 @@ use bencher_endpoint::{
33
ResponseOk, TotalCount,
44
};
55
use bencher_json::{
6-
organization::member::{JsonNewMember, JsonUpdateMember},
76
JsonAuthAck, JsonDirection, JsonMember, JsonMembers, JsonPagination, ResourceId, Search,
87
UserName,
8+
organization::member::{JsonNewMember, JsonUpdateMember},
99
};
1010
use bencher_rbac::organization::Permission;
1111
use bencher_schema::{
12-
conn_lock,
12+
INVITE_TOKEN_TTL, conn_lock,
1313
context::{ApiContext, Body, ButtonBody, DbConnection, Message},
1414
error::{forbidden_error, issue_error, resource_conflict_err, resource_not_found_err},
1515
model::{
16-
organization::{member::QueryMember, OrganizationId, QueryOrganization},
16+
organization::{OrganizationId, QueryOrganization, member::QueryMember},
1717
user::{
18-
auth::{AuthUser, BearerToken},
1918
QueryUser, UserId,
19+
auth::{AuthUser, BearerToken},
2020
},
2121
},
22-
schema, INVITE_TOKEN_TTL,
22+
schema,
2323
};
2424
use diesel::{
25-
BoolExpressionMethods as _, ExpressionMethods as _, QueryDsl as _, RunQueryDsl as _, TextExpressionMethods as _,
25+
BoolExpressionMethods as _, ExpressionMethods as _, QueryDsl as _, RunQueryDsl as _,
26+
TextExpressionMethods as _,
2627
};
27-
use dropshot::{endpoint, HttpError, Path, Query, RequestContext, TypedBody};
28+
use dropshot::{HttpError, Path, Query, RequestContext, TypedBody, endpoint};
2829
use schemars::JsonSchema;
2930
use serde::Deserialize;
3031
use slog::Logger;
@@ -53,7 +54,6 @@ pub struct OrgMembersQuery {
5354
pub search: Option<Search>,
5455
}
5556

56-
#[expect(clippy::no_effect_underscore_binding, clippy::unused_async)]
5757
#[endpoint {
5858
method = OPTIONS,
5959
path = "/v0/organizations/{organization}/members",
@@ -280,7 +280,10 @@ async fn post_inner(
280280
title: format!("Invitation to join {org_name}"),
281281
preheader: "Click the provided link to join.".into(),
282282
greeting: if let Some(name) = name {
283-
format!("Ahoy {name}!") } else { "Ahoy!".into() },
283+
format!("Ahoy {name}!")
284+
} else {
285+
"Ahoy!".into()
286+
},
284287
pre_body: format!(
285288
"Please, click the button below or use the provided token to accept the invitation from {user_name} ({user_email}) to join {org_name} as a {org_role} on Bencher.",
286289
user_name = auth_user.user.name,
@@ -327,7 +330,6 @@ pub struct OrgMemberParams {
327330
pub user: ResourceId,
328331
}
329332

330-
#[expect(clippy::no_effect_underscore_binding, clippy::unused_async)]
331333
#[endpoint {
332334
method = OPTIONS,
333335
path = "/v0/organizations/{organization}/members/{user}",

0 commit comments

Comments
 (0)