Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 44 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions crates/crates_io_database/src/utils/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ impl HashedToken {
}

pub fn hash(plaintext: &str) -> Vec<u8> {
#[expect(deprecated)]
Sha256::digest(plaintext.as_bytes()).as_slice().to_vec()
}
}
Expand Down Expand Up @@ -99,7 +98,6 @@ mod tests {
use googletest::prelude::*;

#[test]
#[expect(deprecated)]
fn test_generated_and_parse() {
let token = PlainToken::generate();
assert_that!(token.expose_secret(), starts_with(TOKEN_PREFIX));
Expand Down
1 change: 0 additions & 1 deletion crates/crates_io_trustpub/src/access_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ mod tests {
}

#[test]
#[expect(deprecated)]
fn test_sha256() {
let token = AccessToken(SecretString::from(EXAMPLE_TOKEN));
let hash = token.sha256();
Expand Down
1 change: 0 additions & 1 deletion src/controllers/github/secret_scanning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ async fn alert_revoke_token(
let hashed_token = token.sha256();

// Delete the token and return crate_ids for notifications
#[expect(deprecated)]
let crate_ids = diesel::delete(trustpub_tokens::table)
.filter(trustpub_tokens::hashed_token.eq(hashed_token.as_slice()))
.returning(trustpub_tokens::crate_ids)
Expand Down
1 change: 0 additions & 1 deletion src/controllers/krate/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ pub async fn publish(app: AppState, req: Parts, body: Body) -> AppResult<Json<Go

let hashed_token = trustpub_token.sha256();

#[expect(deprecated)]
let (crate_ids, trustpub_data): (Vec<Option<i32>>, Option<TrustpubData>) =
trustpub_tokens::table
.filter(trustpub_tokens::hashed_token.eq(hashed_token.as_slice()))
Expand Down
1 change: 0 additions & 1 deletion src/controllers/trustpub/tokens/revoke/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub async fn revoke_trustpub_token(app: AppState, auth: AuthHeader) -> AppResult

let mut conn = app.db_write().await?;

#[expect(deprecated)]
diesel::delete(trustpub_tokens::table)
.filter(trustpub_tokens::hashed_token.eq(hashed_token.as_slice()))
.execute(&mut conn)
Expand Down
1 change: 0 additions & 1 deletion src/tests/krate/publish/trustpub_github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ fn generate_token() -> (String, Output<Sha256>) {
(token.finalize().expose_secret().to_string(), token.sha256())
}

#[expect(deprecated)]
async fn new_token(conn: &mut AsyncPgConnection, crate_id: i32) -> QueryResult<String> {
let (token, hashed_token) = generate_token();

Expand Down
1 change: 0 additions & 1 deletion src/tests/krate/publish/trustpub_gitlab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ fn generate_token() -> (String, Output<Sha256>) {
(token.finalize().expose_secret().to_string(), token.sha256())
}

#[expect(deprecated)]
async fn new_token(conn: &mut AsyncPgConnection, crate_id: i32) -> QueryResult<String> {
let (token, hashed_token) = generate_token();

Expand Down
1 change: 0 additions & 1 deletion src/tests/routes/trustpub/tokens/exchange/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ async fn test_happy_path() -> anyhow::Result<()> {

let mut conn = client.app().db_conn().await;

#[expect(deprecated)]
let tokens = trustpub_tokens::table
.filter(trustpub_tokens::hashed_token.eq(hashed_token.as_slice()))
.select((trustpub_tokens::id, trustpub_tokens::crate_ids))
Expand Down
1 change: 0 additions & 1 deletion src/tests/routes/trustpub/tokens/exchange/gitlab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ async fn test_happy_path() -> anyhow::Result<()> {

let mut conn = client.app().db_conn().await;

#[expect(deprecated)]
let tokens = trustpub_tokens::table
.filter(trustpub_tokens::hashed_token.eq(hashed_token.as_slice()))
.select((trustpub_tokens::id, trustpub_tokens::crate_ids))
Expand Down
1 change: 0 additions & 1 deletion src/tests/routes/trustpub/tokens/revoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ fn generate_token() -> (String, Output<Sha256>) {
(token.finalize().expose_secret().to_string(), token.sha256())
}

#[expect(deprecated)]
async fn new_token(conn: &mut AsyncPgConnection, crate_id: i32) -> QueryResult<String> {
let (token, hashed_token) = generate_token();

Expand Down
Loading