Skip to content

Conversation

@paulgb
Copy link
Member

@paulgb paulgb commented Jan 23, 2025

This adds a rust client and command-line program. The command-line program is intended to replace the typescript/oclif CLI app.

@paulgb paulgb force-pushed the paulgb/rust-client-wip branch from 08fbf62 to f97e3a7 Compare January 23, 2025 11:40
@paulgb paulgb changed the title wip rust client Rust client Jan 23, 2025
@paulgb paulgb marked this pull request as ready for review January 23, 2025 15:10

impl ApiToken {
pub fn new(token: String) -> Self {
let (id, token) = token.split_once(SEPARATOR).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using unwrap() here can cause a panic if the token does not contain the separator. Consider handling this case gracefully, perhaps by returning a Result or using expect() with a clear error message.

@paulgb paulgb merged commit 4c41f25 into main Jan 23, 2025
2 checks passed
@paulgb paulgb deleted the paulgb/rust-client-wip branch January 23, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants