Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New authorisation submodule #2

Merged
merged 4 commits into from
May 19, 2024
Merged

New authorisation submodule #2

merged 4 commits into from
May 19, 2024

Conversation

kylerchin
Copy link
Member

Several proposed changes:

  • Vec<String> is heap allocated and slower, and thus [&str] is introduced as a stack allocated faster alternative to slightly speed up iteration. This is helpful for large loops.

  • Token generation is moved into a seperate function in the library so it can be called by users easily.
    Perhaps we should also write a function that allows users to read the values from a file, although I will probably use ENV variables for now.

  • GitHub workflows to enable code checking on GitHub

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@@ -5,116 +5,110 @@
use serde_json::*;
use std::{collections::HashMap, env, error::Error, fs::File, path::Path};
//use std::io::Write;
use catenary_tdx_data::auth::{AUTH_URL, URL_HEAD};

Check warning

Code scanning / clippy

unused import: AUTH_URL Warning

unused import: AUTH\_URL
@@ -5,116 +5,110 @@
use serde_json::*;
use std::{collections::HashMap, env, error::Error, fs::File, path::Path};
//use std::io::Write;
use catenary_tdx_data::auth::{AUTH_URL, URL_HEAD};

Check warning

Code scanning / clippy

unused import: AUTH_URL Warning

unused import: AUTH\_URL
src/main.rs Fixed Show fixed Hide fixed
src/main.rs Fixed Show fixed Hide fixed
src/main.rs Fixed Show fixed Hide fixed
src/main.rs Fixed Show fixed Hide fixed
src/main.rs Fixed Show fixed Hide fixed
src/main.rs Fixed Show fixed Hide fixed
Copy link
Member

@chw-03 chw-03 left a comment

Choose a reason for hiding this comment

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

Clippy warning that AUTH_URL is unused in main; I double-checked and yes, you don't have to import it -- that link is only to get the bearer token.
Everything else looks good! I'll fix the thing on my end.
Thanks for adding all the code checking dependabot stuff :D

@chw-03 chw-03 merged commit 8e282bc into main May 19, 2024
5 checks passed
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