Skip to content

Commit 8b4867b

Browse files
committed
codex: fix remaining CI lint on PR #18161
1 parent 7c65799 commit 8b4867b

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

codex-rs/app-server/src/codex_message_processor.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,15 +1628,12 @@ impl CodexMessageProcessor {
16281628
}
16291629

16301630
if let Some(expected_workspaces) = self.config.forced_chatgpt_workspace_id.as_deref()
1631-
&& !expected_workspaces
1632-
.iter()
1633-
.any(|expected_workspace| chatgpt_account_id == *expected_workspace)
1631+
&& !expected_workspaces.contains(&chatgpt_account_id)
16341632
{
16351633
let error = JSONRPCErrorError {
16361634
code: INVALID_REQUEST_ERROR_CODE,
16371635
message: format!(
1638-
"External auth must use one of workspace(s) {:?}, but received {chatgpt_account_id:?}.",
1639-
expected_workspaces
1636+
"External auth must use one of workspace(s) {expected_workspaces:?}, but received {chatgpt_account_id:?}.",
16401637
),
16411638
data: None,
16421639
};

codex-rs/login/src/auth/manager.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,9 +1710,7 @@ impl AuthManager {
17101710
)));
17111711
};
17121712
if let Some(expected_workspace_ids) = forced_chatgpt_workspace_id.as_deref()
1713-
&& !expected_workspace_ids
1714-
.iter()
1715-
.any(|expected| chatgpt_metadata.account_id == *expected)
1713+
&& !expected_workspace_ids.contains(&chatgpt_metadata.account_id)
17161714
{
17171715
return Err(RefreshTokenError::Transient(std::io::Error::other(
17181716
format!(

0 commit comments

Comments
 (0)