-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
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
@@ -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
There was a problem hiding this 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
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